线上服务器动态开启FTP命令端口

作者:linux120 发布时间:January 12, 2016 分类:服务器配置

*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [10916:13864682]
-A INPUT -p tcp -m tcp --dport 35000:35999 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 51 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -m length --length 88 -m recent --set --name open --rsource -j ACCEPT
-A INPUT -p tcp -m tcp --dport 21 --tcp-flags FIN,SYN,RST,ACK SYN -m recent --rcheck --seconds 300 --name open --rsource -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT