Creating a NAT with one eth interface

Wander Boessenkool wander at tomaatnet.nl
Sun May 29 17:35:39 UTC 2005


On Sun, 2005-05-29 at 11:21 -0600, Luis Murillo wrote:
> The eth0 on the "server" would have the following set-up:
> 	eth0 - IP assigned through DHCP (WAN)
> 	eth0:0 - 192.168.1.1 (LAN)
> 

sudo vi /etc/network/options:
change:
ip_forward=no
to:
ip_forward=yes

and then run:
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

ofcourse, you'll have to give the other machines static-ip-addresses,
since running two dhcp-servers on the same lan is a guaranteed way to
give yourself a headache.

-- 
BOFH excuse #107:

The keyboard isn't plugged in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050529/46ff3c1b/attachment.sig>


More information about the ubuntu-users mailing list