Almost everyone knows that Linux makes an excellent firewall. Whether you use it in conjunction with serving your Web pages or FTP site, or as a standalone front-end to your internal LAN, Linux provides the tools necessary to build a firewall to meet your specific needs. Built into the Linux kernel is ipchains, the basic firewall utility needed to deny, accept, and route packets across your system. The Linux kernel specifies three categories of filters for firewall traffic.
Different rules apply to each type of traffic, yielding an extremely versatile firewall.
These default policies control how the system will react to any particular packet that reaches the firewall. You can use the standard policies for any given rule, or you can jump to another user-defined rule for further processing. This policy is especially useful when Linux is being used as a router. It simply returns to the calling chain. If it is used in one of the three kernel chain categories, it means to exit the chain and use the default policy for the chain, instead.