you could generate a very decent iptables gateway script using this:
once the script is generated, copy and paste it into a text file, make it executable, and then run it as root to see if it works...
chmod a+x firewall-example.sh
when you know it works, then you can make it start automatically at boot time by adding it to your startup scripts...
you could also use shorewall if you want, but the web-generated iptables script method is less of a hassle to get going...
and if you want something with a graphical interface:
though shorewall does have a webmin module that allows you to configure it through your browser:
oh, and if you wanna learn more about iptables and stuff, here's a good link to get started: