需要帮助的iptables

我有一个新的服务器,我不知道iptables。 我试过打开端口(25565,如下所示),但仍然无法连接。 iptables -L说以下;

Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT icmp -- anywhere anywhere ACCEPT all -- anywhere anywhere ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) target prot opt source destination REJECT all -- anywhere anywhere reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:25565 

我认为这是拒绝与ICMP主机禁止,但我不知道这是什么意思。

closuresiptables允许访问,所以它不是运行的服务,这是问题。

提前致谢!

接受的规则应该被添加到INPUT链之前,拒绝一切。

以下应该工作:

 iptables -I INPUT 4 -p tcp --dport 25565 -j ACCEPT 

如果它工作,然后清除您的OUTPUT链,并保存您的iptables设置:

 iptables -F OUTPUT /etc/init.d/iptables save 

它应该是:

 iptables -I INPUT 4 -p tcp --dport 25565 --syn -m state --state NEW -j ACCEPT