<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 &gt; /proc/sys/net/ipv4/ip_forward</div>
<div>2. iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE</div><div><br></div><div>Don&#39;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">&lt;<a href="mailto:danshimsh@gmail.com">danshimsh@gmail.com</a>&gt;</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&#39;t know much about iptables.<br>
<br>
Second, I have a Linux machine (&quot;A&quot;) 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 (&quot;B&quot;), nearby. This machine is connected directly<br>
to machine &quot;A&quot; 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 &quot;B&quot; to the Internet via machine &quot;A&quot;.<br>
I suppose this is possible by setting some iptables rule on machine &quot;A&quot;, and<br>
setting it to work in forwarding mode. Could this done by setting one<br>
iptables rule<br>
on machine &quot;A&quot;?<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>