WAN connection through a Linux machine
Dan Shimshoni
danshimsh at gmail.com
Tue Apr 20 13:44:02 IDT 2010
Hi,
Well, this did not work at the first trial.
Then, I added 192.168.0.10 as a default gateway on 192.168.0.10 :
route add default gw 192.168.0.10
And it worked
Thanks!
DS
On Tue, Apr 20, 2010 at 9:35 AM, Etzion Bar-Noy
<ezaton at tournament.org.il> wrote:
> Oops - and now with reply-all...
> Hi.
> You should run both these commands (I will not disclose how you make it
> apply after-reboot for now)
> 1. echo 1 > /proc/sys/net/ipv4/ip_forward
> 2. iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
> Don't forget to set correct DNS on your host B
> Ez
> On Tue, Apr 20, 2010 at 8:29 AM, Dan Shimshoni <danshimsh at gmail.com> wrote:
>>
>> Hello,
>> First, I don't know much about iptables.
>>
>> Second, I have a Linux machine ("A") with two nics, which is connected
>> to the Internet via Bezeq ADSL router.
>> This machines runs a pppoe connection to the intenet, so the
>> connection is done via ppp0.
>> On eth1 I have an inner IP address which I set manually (192.168.0.10).
>>
>> I have a second Linux machine ("B"), nearby. This machine is connected
>> directly
>> to machine "A" via ethernet cable. On eth0 I have an inner IP address
>> which
>> I set manually (192.168.0.11). So I can ping from 192.168.0.11 to
>> 192.168.0.10.
>>
>> Sometimes I want to connect from machine "B" to the Internet via machine
>> "A".
>> I suppose this is possible by setting some iptables rule on machine "A",
>> and
>> setting it to work in forwarding mode. Could this done by setting one
>> iptables rule
>> on machine "A"?
>> What is the proper rule to achieve it?
>>
>> DS
>>
>> _______________________________________________
>> Linux-il mailing list
>> Linux-il at cs.huji.ac.il
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
More information about the Linux-il
mailing list