[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: MASQUERADE problem



At 08:09 PM 10/22/01 +0200, you wrote:

The line

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

should be using interface eth1 not ppp0 as you (probably) don't have a ppp interface.

Also you should add this

echo 1 > /proc/sys/net/ipv4/ip_forward

to enable IP forwarding. The redirect line isn't needed to do MASQ, the above 2 lines alone should do it.

Dave


Hi all,

I've installed a router with linux (a pc with an internet connection). I
would like share this connection with the others pc on my network,  but it
doesn't work. COuld anyone help me ?

This my config :

eth0 (10.0.0.1) connected to internet
eth1 (192.168.0.1) connected to the rest of my lan

on my second pc (192.168.0.12), i've defined the default gateway as
192.168.0.1.

On the router, I have done the following :

iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth0 -j REDIRECT

When the pc tries to ping an address on the internet, there is a message
'network unreachable'

What shall I do to make it work ?

Best regards



Reply to: