This tutorial guides you how firewall works in Linux Operating system and what is IPTables in Linux? Firewall decides fate of packets incoming and outgoing in system. IPTables is a rule based firewall and it is pre-installed on most of Linux operating system. By default it runs without any rules. IPTables was included in Kernel 2.4, prior it was called ipchains or ipfwadm. IPTables is a front-end tool to talk to the kernel and decides the packets to filter. This guide may help you to rough idea and basic commands of IPTables where we are going to describe practical iptables rules which you may refer and customized as per your need.
Different services is used for different protocols as:
- iptables applies to IPv4.
- ip6tables applies to IPv6.
- arptables applies to ARP.
- ebtables applies to Ethernet frames..
IPTables main files are:
- /etc/init.d/iptables – init script to start|stop|restart and save rulesets.
- /etc/sysconfig/iptables – where Rulesets are saved.
- /sbin/iptables – binary.
There are at present three tables.
- Filter
- NAT
- Mangle