If a system port 6379 is bound to listen on ip127.0.0.1, the port will only deny connections to non-listening IP hosts through connection requests from this IP.
Telnet 10.10.86.211 9000
Trying 10.10.86.211 ...
Telnet:connect to address 10.10.86.211:connection refused
Another reason: firewall interception. (only need to release the corresponding host IP in the firewall of the Telnet server, the port can be)
If the port is bound to listen to IP, which causes connection refused, the analysis resolves:
[Email protected] xinetd.d]# NETSTAT-ANP |grep 6379
TCP 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 12159/redis-server
TCP 0 0 127.0.0.1:40345 127.0.0.1:6379 established 14735/python
TCP 0 0 127.0.0.1:6379 127.0.0.1:40337 established 12159/redis-server
TCP 0 0 127.0.0.1:6379 127.0.0.1:40335 established 12159/redis-server
TCP 0 0 127.0.0.1:40339 127.0.0.1:6379 established 14735/python
TCP 0 0 127.0.0.1:40343 127.0.0.1:6379 established 14735/python
TCP 0 0 127.0.0.1:40347 127.0.0.1:6379 established 14735/python
TCP 0 0 127.0.0.1:6379 127.0.0.1:40345 established 12159/redis-server
6379 Port monitoring Local address 127.0.0.1
or modify the configuration document (e.g. REDIS,/ETC/REDIS.CNF)
Vim/etc/redis.cnf
Bind 127.0.0.1 before adding #, the 6379 port will not only listen on the local IP
$ telnet 10.10.86.211 6379
[Email protected] xinetd.d]# NETSTAT-ANP |grep 6379
TCP 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 12341/redis-server
TCP 0 0 10.10.86.211:6379 10.10.86.200:52808 established 12341/redis-server
TCP6 0 0::: 6379:::* LISTEN 12341/redis-server
TCP6 0 0:: 1:6379:: 1:54007 established 12341/redis-server
TCP6 0 0:: 1:6379:: 1:54009 established 12341/redis-server
TCP6 0 0:: 1:54009:: 1:6379 established 14735/python
TCP6 0 0:: 1:6379:: 1:54005 established 12341/redis-server
TCP6 0 0:: 1:54006:: 1:6379 established 14735/python
TCP6 0 0:: 1:6379:: 1:54008 established 12341/redis-server
Show other IPs can telnet the server to that port.
Redis binds multiple listening IPs or unbind