<div dir="ltr"><div>Oops - and now with reply-all...</div><div><br></div><div>Hi.</div><div>You should run both these commands (I will not disclose how you make it apply after-reboot for now)</div><div><br></div><div>1. echo 1 > /proc/sys/net/ipv4/ip_forward</div>
<div>2. iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE</div><div><br></div><div>Don't forget to set correct DNS on your host B</div><div><br></div><div>Ez</div><br><div class="gmail_quote">On Tue, Apr 20, 2010 at 8:29 AM, Dan Shimshoni <span dir="ltr"><<a href="mailto:danshimsh@gmail.com">danshimsh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hello,<br>
First, I don't know much about iptables.<br>
<br>
Second, I have a Linux machine ("A") with two nics, which is connected<br>
to the Internet via Bezeq ADSL router.<br>
This machines runs a pppoe connection to the intenet, so the<br>
connection is done via ppp0.<br>
On eth1 I have an inner IP address which I set manually (192.168.0.10).<br>
<br>
I have a second Linux machine ("B"), nearby. This machine is connected directly<br>
to machine "A" via ethernet cable. On eth0 I have an inner IP address which<br>
I set manually (192.168.0.11). So I can ping from 192.168.0.11 to 192.168.0.10.<br>
<br>
Sometimes I want to connect from machine "B" to the Internet via machine "A".<br>
I suppose this is possible by setting some iptables rule on machine "A", and<br>
setting it to work in forwarding mode. Could this done by setting one<br>
iptables rule<br>
on machine "A"?<br>
What is the proper rule to achieve it?<br>
<br>
DS<br>
<br>
_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
</blockquote></div><br></div>