Iptables is a firewall on linux os.You can manage your ınput and output traffic with a lots of properties.You can use iptables like a router, nat or proxy too.
There are three default chain comes with iptables.These are
Input:You can arrenge packets that comes to your computer.
Forward:You can arrrange packets that forwarded on your computer.
Output:You can arrange your output packets from your computer.