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

Re: MASQUERADE problem



Not an answer to the problem, just a question. What's the difference between
iptables and ipchains?

Michael


on 23.10.2001 9:54 PM, someone claiming to be Michael R. Schwarzbach
[spg@fs.tum.de] said:
>
> Luc MAIGNAN wrote:
> 
>> 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 ?
> 
> 
> two things:
> 
> 1.) Have you checked "/proc/sys/net/ipv4/ip_forward"?
> This must be set to "1", otherwise the router won't route any packet
> 
> 2.) I don't know, what you wanna do with your chains...
> My Masquerading chains (and these of many others) look a bit different:
> 
> "iptables -t nat -A POSTROUTING -i eth0 -s 10.0.0.0/24 -j MASQUERADE"
> 
> This should do it for Masqueradng the other PCs.
> 
> 
>> 
>> 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: