Iptables

From KlavoWiki
Revision as of 10:46, 4 May 2014 by David (Sọ̀rọ̀ | contribs) (Created page with "= Chains = <pre> INPUT OUTPUT FORWARD </pre> = Drop = Drop from Source <pre> iptables -I INPUT -s 23.253.232.189 -j DROP </pre> <pre> -I Insert -A Append -s Source -d Destin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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