<div dir="ltr">I was having a problem with not being able to re-connect to my FR after unplugging the usb. I'd have to reboot my lappy in order to ssh to the FR. I saw the fix listed on the usb networking page: <br><br>
<a href="http://wiki.openmoko.org/wiki/USB_Networking">http://wiki.openmoko.org/wiki/USB_Networking</a><br><br>Since I use Ubuntu I changed the order of the code as instructed despite the comments that it doesn't work. It worked for me. <br>
<br>However, I was checking out the suggested code for /etc/network/interfaces and it is different from what was posted several weeks ago. I had edited the original /etc/network/interfaces to this:<br>----------------------------<br>
<span style="color: rgb(0, 0, 0);">auto lo</span><br style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 0);">iface lo inet loopback</span><br style="color: rgb(0, 0, 0);"><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);">auto usb0</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">iface usb0 inet static</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">address <a href="http://192.168.0.200">192.168.0.200</a></span><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);">netmask <a href="http://255.255.255.0">255.255.255.0</a></span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);">network <a href="http://192.168.0.0">192.168.0.0</a></span><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);"> up iptables -A POSTROUTING -t nat -j MASQUERADE -s <a href="http://192.168.0.0/24">192.168.0.0/24</a> &</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> up echo 1 > /proc/sys/net/ipv4/ip_forward &</span><br style="color: rgb(255, 0, 0);">
<span style="color: rgb(255, 0, 0);"> up iptables -P FORWARD ACCEPT &</span><br style="color: rgb(255, 0, 0);"><span style="color: rgb(255, 0, 0);"> down iptables -D POSTROUTING -t nat -j MASQUERADE -s <a href="http://192.168.0.0/24">192.168.0.0/24</a> &</span><br style="color: rgb(255, 0, 0);">
<br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><br style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">iface eth0 inet dhcp</span><br style="color: rgb(0, 0, 0);">
<br style="color: rgb(0, 0, 0);"><span style="color: rgb(255, 0, 0);"><span style="color: rgb(0, 0, 0);">auto </span><font color="#000000"><br>---------------------------------<br>This has worked fine so far AFAIK.<br><br>
However, the current suggested code for </font></span>/etc/network/interfaces<span style="color: rgb(255, 0, 0);"><font color="#000000"> is:<br>---------------------------------<br></font></span><pre> allow-hotplug usb0<br>
iface usb0 inet static<br> address <a href="http://192.168.0.200">192.168.0.200</a><br> netmask <a href="http://255.255.255.192">255.255.255.192</a><br> post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s <a href="http://192.168.0.192/26">192.168.0.192/26</a><br>
post-up echo 1 > /proc/sys/net/ipv4/ip_forward<br> post-up iptables -P FORWARD ACCEPT<br> pre-down iptables -D POSTROUTING -t nat -j MASQUERADE -s <a href="http://192.168.0.192/26">192.168.0.192/26</a><br>
</pre>
---------------------------------<br><br>What is the difference between 'auto usb0' and 'allow-hotplug usb0'?<br><br></div>