我需要在 RHEL 5.9 版服务器上打开端口 10000。
我做了什么来打开它:
已停止 iptables 服务:
# service iptable stop
当然是从 root 用户执行此命令:
# iptables -I INPUT -p tcp --dport 10000 -j ACCEPT
-
# iptables-save > /etc/sysconfig/iptables
-
# service iptables start
使用 iptables -L 命令验证:
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:10000
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
我可以通过该端口从该 RHEL 服务器远程登录到我的 Windows Server 2012。但我无法从 Windows 服务器远程登录。
我认为这是 Linux 防火墙的问题,而不是 Windows 防火墙的问题,因为我在“linux 服务器(测试服务器)”上执行了相同的步骤,并且在执行上述相同的步骤后能够远程登录它。
从 Windows 服务器进行远程登录时遇到的错误是:
从窗口:
telnet <ip_address_of_targeted_linux_server> 10000
输出:
connecting to <ip_address_of_targeted_linux_server> ... could not open connection to the host, on port 10000: connect failed
根据我提供的信息,知道我错过了什么吗?
最佳答案
谨此通知您,我已找到问题的解决方案。在/etc/services 中,ndmp 值不是 10000。因此我使用正确的值对其进行了编辑,然后重新启动使用该端口并能够连接的服务。
关于linux - 无法打开10000端口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43248845/