did try that and did work when I was using a debian 5 box but no chance with ubuntu 9.04 :(<br><br>Thanks <br><br>Tony<br><br><div class="gmail_quote">On Thu, Oct 8, 2009 at 1:21 PM, Sander van Grieken <span dir="ltr">&lt;<a href="mailto:sander@3v8.net">sander@3v8.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Why use a script that you need to run manually each time?<br>
<br>
It can be done automatically just by putting the right stuff in /etc/network/interfaces:<br>
<br>
auto eth2<br>
iface eth2 inet static<br>
<div class="im">  address 192.168.0.200<br>
</div><div class="im">  netmask 255.255.255.0<br>
</div>  post-up iptables -t nat -A POSTROUTING -s <a href="http://192.168.0.0/24" target="_blank">192.168.0.0/24</a> -j MASQUERADE<br>
  post-up echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br>
  post-up route add -host 192.168.0.202 dev eth2<br>
  post-up dnsmasq<br>
  pre-down echo 0 &gt; /proc/sys/net/ipv4/ip_forward<br>
  pre-down iptables -t nat -D POSTROUTING -s <a href="http://192.168.0.0/24" target="_blank">192.168.0.0/24</a> -j MASQUERADE<br>
  pre-down killall dnsmasq<br>
<br>
<br>
when you plug in the FR, eth2 will activate automatically..<br>
<br>
grtz<br>
<font color="#888888">Sander<br>
</font><div><div></div><div class="h5"><br>
<br>
On Thursday 08 October 2009 03:24:06 Cristian Gómez wrote:<br>
&gt; Hi Tony, thanks for giving a try to the script. I&#39;m glad it helped you. I<br>
&gt; just create a sub-section on the wiki page [1] where I put the script to<br>
&gt; help others to get connected easily.<br>
&gt;<br>
&gt; Cheers<br>
&gt;<br>
&gt; [1] <a href="http://wiki.openmoko.org/wiki/USB_Networking#Connection_Script" target="_blank">http://wiki.openmoko.org/wiki/USB_Networking#Connection_Script</a><br>
&gt;<br>
&gt; /***************************************<br>
&gt; * Don&#39;t Worry.......Be Linux!!!!<br>
&gt; * Cristian Gómez Alvarez<br>
&gt; * Ingeniero en Sistemas y Computación<br>
&gt; * Universidad de Caldas<br>
&gt; * Comunidad de Software Libre Manizales<br>
&gt; * IEEE/WIE Student Member<br>
&gt; * Linux User #463617<br>
&gt; * Mi Blog: <a href="http://cristianpark.sehablalinux.com/" target="_blank">http://cristianpark.sehablalinux.com/</a><br>
&gt; ****************************************/<br>
&gt;<br>
&gt;<br>
&gt; 2009/10/7 Tony Berth &lt;<a href="mailto:tonyberth@googlemail.com">tonyberth@googlemail.com</a>&gt;<br>
&gt;<br>
&gt; &gt; On Wed, Oct 7, 2009 at 10:27 AM, Matthias Huber &lt;<br>
&gt; &gt;<br>
&gt; &gt; <a href="mailto:matthias.huber@wollishausen.de">matthias.huber@wollishausen.de</a>&gt; wrote:<br>
&gt; &gt;&gt;  Tony Berth schrieb:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Bingo. Thanks A LOT!<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Is it possible to update the Wiki with that one. I think this will be a<br>
&gt; &gt;&gt; great help to the whole community<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;  if you would tell me wich of / or both tricks did it on your system ?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; but i had to add this two lines to my /etc/ufw/ufw.conf<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; ufw allow from 192.168.0.202<br>
&gt; &gt;&gt;&gt;&gt; ufw allow to 192.168.0.202<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; another trial with iptables needs to load some modules too:<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; #!/bin/sh<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; MOKO=192.168.0.202<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br>
&gt; &gt;&gt;&gt;&gt;  modprobe ipt_MASQUERADE<br>
&gt; &gt;&gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt;&gt; iptables -I FORWARD -j ACCEPT -d ${MOKO}/32<br>
&gt; &gt;&gt;&gt;&gt; iptables -I FORWARD -j ACCEPT -s ${MOKO}/32<br>
&gt; &gt;&gt;&gt;&gt; iptables -I POSTROUTING -t nat -j MASQUERADE -s ${MOKO}/32<br>
&gt; &gt;<br>
&gt; &gt; what works was the script Cristian Gomez included in his reply!<br>
&gt; &gt;<br>
&gt; &gt; Just for the records, the first time I run that script it does assign the<br>
&gt; &gt; 192.168.0.200 IP to eth1 but can&#39;t ping/access 192.168.0.202! Then:<br>
&gt; &gt;<br>
&gt; &gt; - I disconnect Openmoko<br>
&gt; &gt; - connect it again<br>
&gt; &gt; - re-run the script and voila the connection is there!<br>
&gt; &gt;<br>
&gt; &gt; Thanks<br>
&gt; &gt;<br>
&gt; &gt; Tony<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Openmoko community mailing list<br>
&gt; &gt; <a href="mailto:community@lists.openmoko.org">community@lists.openmoko.org</a><br>
&gt; &gt; <a href="http://lists.openmoko.org/mailman/listinfo/community" target="_blank">http://lists.openmoko.org/mailman/listinfo/community</a><br>
&gt;<br>
<br>
_______________________________________________<br>
Openmoko community mailing list<br>
<a href="mailto:community@lists.openmoko.org">community@lists.openmoko.org</a><br>
<a href="http://lists.openmoko.org/mailman/listinfo/community" target="_blank">http://lists.openmoko.org/mailman/listinfo/community</a><br>
</div></div></blockquote></div><br>