我有两台具有以下规格的服务器:
IP 地址:192.168.1.94
IP 地址:192.168.1.221
我想telnet从第二个(到端口 5029)转到第一个,但出现此错误:
root@debian:~# telnet 192.168.1.94 5029
Trying 192.168.1.94...
telnet: Unable to connect to remote host: Connection refused
Run Code Online (Sandbox Code Playgroud)
我可以从 192.168.1.94 telnet 到它自己。这意味着程序正在侦听 5029 端口:
[root@myelastix ~]# telnet localhost 5029
Trying 127.0.0.1...
Connected to myelastix.mohaymen.co (127.0.0.1).
Escape character is '^]'.
Run Code Online (Sandbox Code Playgroud)
我认为可能是防火墙阻止了 192.168.1.94 服务器中的连接,但这些是防火墙规则:
[root@myelastix ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Run Code Online (Sandbox Code Playgroud)
除了我也停止了 iptables 但没有再发生任何事情:
[root@myelastix ~]# service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Run Code Online (Sandbox Code Playgroud)
问题是什么?
小智 7
你能做这个吗?
[root@myelastix ~]# telnet 192.168.1.94 5029
Run Code Online (Sandbox Code Playgroud)
如果没有,请确保telnetd已配置为侦听外部接口。
netstat -tulpn | grep :5029
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
89033 次 |
| 最近记录: |