You can use iptables to set up NAT (network address translation). Here's a short explanation:
http://www.revsys.com/writings/quicktips/nat.htmlYou may want to use a more detailed set up with basic firewall settings, of course. If you're using something like pppoe (e.g. a DSL modem), you may also want to add something like this at the end to make sure your maximum segment size matches the maximum supported over pppoe connections (braindead firewall configurations blocking ICMP all over the Internet will otherwise wreak havok with the automatic detection of the maximum segment size (path MTU discovery); the effect is, for example, that some web sites behind such firewall configurations will appear to hang and never finish loading):
iptables -A FORWARD -s 192.168.0.0/255.255.0.0 ! -d 192.168.0.0/255.255.0.0 -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
(this assumes you're using an address in the 192.168.x.x range for your LAN)
Thanks,
--Christian