清除所有规则: iptables -F
开放常用tcp端口: iptables -I INPUT -p tcp -m multiport --dports 20,21,22,3690,80,443,4443,8023,8888,25,110,30000...-m multiport --sports 20,21,22,3690,80,443,4443,8023,8888,25,110,30000:30999 -j ACCEPT
开放常用udp端口...ACCEPT iptables -I OUTPUT -p udp -m multiport --sports 53,123,8571,8888 -j ACCEPT
开放特殊udp端口...ACCEPT iptables -I OUTPUT -p tcp -m state --state RELATED,ESTABLISHED -j ACCEPT
设置默认关闭所有端口