#004: Using iptables to share your internet connection
November 11th, 2006 by patrysOne of the less intuitive networking tasks often performed on Linux boxes is the connection sharing process. Here is a short clip to show you how iptables works.
Tips
- Use
iptables -t nat -I POSTROUTING -s 192.168.0.1/24 -j MASQUERADEto set up a dynamic masquerade (the most popular way of sharing the connection where your internet IP is likely to change) - Remember to replace
192.168.0.1/24with your local area network IP and mask in the above example