IPTABLES
There are three tables in Iptables. 1) Filter – It contains built chains to filter the packets inbound & outbound. INPUT – packets coming into box. FORWARD – packet routed through box. OUTPUT – for locally generated packets. 2) Nat – This table consulted when a packet creates new connection. PREROUTING – Altering packets as soon as they come in. OUTPUT – Altering locally generated packets before routing. POSTROUTING – Altering packets as they are going outside. 3) Mangle – Used for specialized packet alteration. INPUT – Packets coming into the box. OUTPUT – Altering local packets before routing. PREROUTING – Altering incoming packets before routing. POSTROUTING – Altering packets as they are about to go outside. Iptables Command List - #iptables -L [ chain ] Lists current iptables configuration. #iptables -A [ chain ] Appending a rule #iptables -R [ chain ] Replace an existing rule. #iptables -D [ chain ] Delete rule from current chain configuration. #iptables -I [ chain ] ...