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"><<a href="mailto:sander@3v8.net">sander@3v8.net</a>></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 > /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 > /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>
> Hi Tony, thanks for giving a try to the script. I'm glad it helped you. I<br>
> just create a sub-section on the wiki page [1] where I put the script to<br>
> help others to get connected easily.<br>
><br>
> Cheers<br>
><br>
> [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>
><br>
> /***************************************<br>
> * Don't Worry.......Be Linux!!!!<br>
> * Cristian Gómez Alvarez<br>
> * Ingeniero en Sistemas y Computación<br>
> * Universidad de Caldas<br>
> * Comunidad de Software Libre Manizales<br>
> * IEEE/WIE Student Member<br>
> * Linux User #463617<br>
> * Mi Blog: <a href="http://cristianpark.sehablalinux.com/" target="_blank">http://cristianpark.sehablalinux.com/</a><br>
> ****************************************/<br>
><br>
><br>
> 2009/10/7 Tony Berth <<a href="mailto:tonyberth@googlemail.com">tonyberth@googlemail.com</a>><br>
><br>
> > On Wed, Oct 7, 2009 at 10:27 AM, Matthias Huber <<br>
> ><br>
> > <a href="mailto:matthias.huber@wollishausen.de">matthias.huber@wollishausen.de</a>> wrote:<br>
> >> Tony Berth schrieb:<br>
> >><br>
> >> Bingo. Thanks A LOT!<br>
> >><br>
> >> Is it possible to update the Wiki with that one. I think this will be a<br>
> >> great help to the whole community<br>
> >><br>
> >> if you would tell me wich of / or both tricks did it on your system ?<br>
> >><br>
> >>>> but i had to add this two lines to my /etc/ufw/ufw.conf<br>
> >>>><br>
> >>>> ufw allow from 192.168.0.202<br>
> >>>> ufw allow to 192.168.0.202<br>
> >>>><br>
> >>>><br>
> >>>> another trial with iptables needs to load some modules too:<br>
> >>>><br>
> >>>> #!/bin/sh<br>
> >>>><br>
> >>>> MOKO=192.168.0.202<br>
> >>>><br>
> >>>> echo 1 > /proc/sys/net/ipv4/ip_forward<br>
> >>>> modprobe ipt_MASQUERADE<br>
> >>>><br>
> >>>> iptables -I FORWARD -j ACCEPT -d ${MOKO}/32<br>
> >>>> iptables -I FORWARD -j ACCEPT -s ${MOKO}/32<br>
> >>>> iptables -I POSTROUTING -t nat -j MASQUERADE -s ${MOKO}/32<br>
> ><br>
> > what works was the script Cristian Gomez included in his reply!<br>
> ><br>
> > Just for the records, the first time I run that script it does assign the<br>
> > 192.168.0.200 IP to eth1 but can't ping/access 192.168.0.202! Then:<br>
> ><br>
> > - I disconnect Openmoko<br>
> > - connect it again<br>
> > - re-run the script and voila the connection is there!<br>
> ><br>
> > Thanks<br>
> ><br>
> > Tony<br>
> ><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>
><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>