Simplest solution is to use Firestarter It's a firewall and supports Internet Connection Sharing. I used a custom written iptables script until I found out about this app.