Does it ever

Depending on your kernel version you can use IPCHAINS or IPTABLES. IPTABLES are the latest and a lot easier to configure from what I hear.
You will probably find several hits if you search LQ for IPCHAINS. Also you probably want to take a look at the Linux Security forum.