netfilter and iptables are building blocks of a framework inside the Linux 2.4.x and 2.6.x kernel. Thisframework enables packet filtering, network address [and port] translation(NA[P]T) and other packet mangling. It is the re-designed and heavily improvedsuclearcase/" target="_blank" >ccessor of the previous Linux 2.2.x ipchainsand Linux 2.0.x ipfwadm systems.
netfilter is a set of hooks inside the Linux kernel that allows kernel modulesto register callback functions with the network stack. A registered callbackfunction is then called back for every packet that traverses the respectivehook within the network stack.
iptables is a generic table structure for the definition of rulesets. Eachrule within an IP table consists of a number of classifiers (iptablesmatches) and one connected action (iptables target).
netfilter, iptables and the connection tracking as well as the NAT subsystemtogether build the whole framework.