Iptables is the softwarepackage that lets you control the firewall that is in you kernel. It can also do NAT (Network Address Translation) for you, which let you hide a complete home-network behind one public IP address.
You can download it from netfilter.org and is currently at version 1.2.9.
By default the iptables extentions should be in /usr/local/lib/iptables, because i like /usr/lib/iptables more, you will need to edit the Makefile
In the Makefile you will find a line starting with PREFIX, and change the /usr/local to /usr.
Now just type make to build the thing. You will get iptables-save, iptables-restore (which i won't use), iptables and ip6tables (which is the IPv6 version of iptables).
If you look at the library dependencies with ldd, you will see that it needs libnsl.so.1 which is not yet on our image.