Iptables
From KlavoWiki
Chains
INPUT OUTPUT FORWARD
Drop
Drop from Source
iptables -I INPUT -s 23.253.232.189 -j DROP
-I Insert -A Append -s Source -d Destination
List
Current tables
iptables -L -v
-L List -v verbose
with Line Numbers
iptables -L -n --line-numbers
List Chain
iptables -L INPUT -n --line-numbers
Delete
by Rule Number
iptables -D INPUT 3
by Rule Name
iptables -D INPUT -s 23.253.232.189 -j DROP
Delete All
Delete all rules
iptables --flush
Rules
Saving
iptables-save > /opt/firewall.conf
Restoring
iptables-restore < /opt/firewall.conf