iptables masquerade with 2 internet nics (and ppp)
Steven Alligood
steve at bluehost.com
Thu Mar 20 15:12:40 MDT 2008
Chris Carey wrote:
> On Thu, Mar 20, 2008 at 1:49 PM, Dave Smith <dave at thesmithfam.org> wrote:
>
>
>> When I run this rule, all is well and wireless clients connected to eth1
>> get internet access through eth0:
>>
>> /sbin/iptables --table nat --append POSTROUTING --out-interface eth0 -j
>> MASQUERADE
>>
>> But when I use this rule, clients can't access the internet:
>>
>> /sbin/iptables --table nat --append POSTROUTING --out-interface ppp0 -j
>> MASQUERADE
>>
>
> Do you have the FORWARD rule which allows eth1 to forward to ppp0?
>
>
Also, don't forget the sysctl setting of
net.ipv4.ip_forward = 1
or the kernel will never send traffic from one interface to the other.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
Url : http://plug.org/pipermail/plug/attachments/20080320/b8a86d13/smime.bin
More information about the PLUG
mailing list