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

Re: NAT & forwarding : only partial connections



On Sat, 27 Nov 2004 16:12:31 +0100, Francesco Bochicchio
<bockman@virgilio.it> wrote:
> Hi all,
> 
> I have a laptop with installed Sarge and a PC with installed Sid. I would
> like to implement this schema:
> 
>    Laptop <-wireless-> PC+ADSL Modem< phone lines> Provider<..>Internet
> 
> I had it working in the past, but after a reinstallation of SID on the
> PC, something broke.
> 
> All the connections works: I can connect to internet from the PC and I can
> connect the laptop and the PC via wireless.
> 
> What I do is this:
>         On the PC : iptables -t NAT -A POSTROUTING -o ppp0 -j MASQUERADE
>                     echo 1  > /proc/sys/net/ipv4/ip_forward
>         On the laptop:
>                     route add default gw pc-ip # where pc-ip is the
>                                                # IP of the PC wlan0
> 

Have you read the masquerading howto? I think there's something more
involved than simple adding a postrouting rule. Anyway, there is a
package available 'ipmasq' which sets up the rules necessary for a
simple NAT scheme automatically. This is the easy way of doing it.

greets,
Wim



Reply to: