iptables -L -n
iptables -A INPUT -p tcp –dport 9122 -j ACCEPT
iptables -A OUTPUT -p tcp –sport 9122 -j ACCEPT
iptables -A INPUT -p tcp –dport 80 -j ACCEPT
iptables -A OUTPUT -p tcp –sport 80 -j ACCEPT
iptables -A INPUT -p tcp –dport 443 -j ACCEPT
iptables -A OUTPUT -p tcp –sport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -j drop
iptables -A OUTPUT -j DROP
iptables -A FORWARD -j DROP
发表评论