basically, to set-up a firewall gateway, you'd need two network interfaces... one goes to the internet and the other goes to your switch/hub (local network)...
the internet interface is your "external" interface, and your lan interface is your "internal" one...
your internal interface gets a private ip such as (for example) 192.168.0.1, while your external interface uses whatever ip your isp provides you with...
you'd need to configure
netfilter using
iptables to do either MASQUERADING (if your external ip is dynamic) or SNAT (if your external ip is static)...
the idea is that the machines on your lan all get private ips (for example 192.168.0.2, 192.168.0.3, etc.) and use the linux box as their gateway...
here's a link with good iptables info:
http://www.linuxguruz.com/iptables
there's also "front-ends" to iptables such as shorewall, firestarter, and guarddog:
http://www.shorewall.net
http://firestarter.sourceforge.net
http://www.simonzone.com/software/guarddog/