http://projectfiles.com/firewall/
At first I tried arno's iptables script, but for some reason it didnt work for me. This script in this link is a bit easier to set up, less knowledge required, it doesnt do loging so I guess its not good for a server or something, but if you just want something to close your ports, this is the one for you.
just save rc.firewall into your /etc/rc.d/ folder, modify it to be configured to your system setup; it should be good to go unless you have internal network interfaces or if you have any dynamic IP interfaces (like ppp0)
# and dont worry, its all HEAVILY commented.
then "#chmod a+x ./rc.firewall", and run it, if it works add it to your rc.S file