1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| iptables -P INPUT ACCEPT/DROP iptables -P OUTPUT ACCEPT/DROP iptables -P FORWARD ACCEPT/DROP
iptables -F iptables -X iptables -Z iptables -L -n iptables-save service iptables save service iptables restart
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -s 192.168.0.0/16 -p tcp --dport 22 -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -j REJECT iptables -A FORWARD -j REJECT
iptables -L --line-numbers iptables -D INPUT 8
|