IP Masquerade Tutorial for Ubuntu ??

Rashkae ubuntu at tigershaunt.com
Fri May 18 00:53:32 UTC 2007

Soo-Hyun Choi wrote:
> Hi,
> I am trying to set up my private network using Ubuntu Feisty as a 
> gateway. I
> searched "IP Masquerade Tutorial" over the web and found tons of those.
> However, it seems that none of them are straightforward to set it up.
> Is there any good (or simple) IP Masquerading tutorial for a Ubuntu 
> machine?
> (Well, of course, once I confirm if it is working, then I should go over a
> strong firewall rule.)
> Many thanks,
> Soo-Hyun

Assuming that eth0 is your interent network, and has an IP address like and eth1 is your internet connection

sudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
sudo echo "1" > /proc/sys/net/ipv4/ip_forward

should do the trick.  You can put those in your /etc/rc.local without 
the sudo's.

More information about the ubuntu-users mailing list