1進入目錄編輯/etc/sysconfig/iptables 檔案
詳細如下
*filter
INPUT ACCEPT [0:0]
FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1374:385513]
-A INPUT -p tcp -m tcp --dport 78 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 79 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22220 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8000 -j ACCEPT
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A OUTPUT -p tcp -m tcp --sport 79 -j ACCEPT
COMMIT
2然後執行 iptables save 指令
3重新開機iptables 服務 service iptables restart