Linux netfilter Hacking HOWTO http://www.samba.org/netfilter/unreliable-guides/netfilter-hacking-HOWTO.html
Rusty Russel This document describes the netfilter architecture for Linux, how to hack it, and some of the major systems which sit on top of it, such as packet filtering, connection tracking and Network Address Translation.