iptables -A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 52025 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp -m udp --sport 161 -j ACCEPT
iptables -A INPUT -s 222.187.0.0/16 -p tcp -j ACCEPT
iptables -A INPUT -s 202.102.37.0/24 -p tcp -j ACCEPT
iptables -A INPUT -s 218.3.241.141/32 -p tcp -j ACCEPT
iptables -A INPUT -s 218.3.241.143/32 -p tcp -j ACCEPT
iptables -A INPUT -s 192.168.127.0/24 -p tcp -j ACCEPT
iptables -t filter -P INPUT DROP
转载于:https://blog.51cto.com/7090376/1782606