Always forget how to route traffic from a router I'm configuring over an Ethernet cable to the Internet over wifi, so here are the steps for my reference next time... maybe it will help someone else also.
On the router:
route add default gw 192.168.42.123 (the eth0 IP of the Linux box)
On the Linux box:
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
That should do it, unless I've forgotten a step.
last updated 2012-10-11 03:19:33. served from tektonic.jcomeau.com