iptables consists of five tables of rules, each with its own distinct purpose:
- Filter table: For basic protection of our servers and clients, this might be the only table that we use.
- Network Address Translation (NAT) table: NAT is used to connect the public internet to private networks.
- Mangle table: This is used to alter network packets as they go through the firewall.
- Raw table: This is for packets that don't require connection tracking.
- Security table: The security table is only used for systems that have SELinux installed.
Since we're currently only interested in basic host protection, we will only look at the filter table for the time being. (In a few moments, I'll show you a couple of fancy tricks ...