<div dir="ltr">2008/10/12 Jeffrey Ratcliffe <span dir="ltr">&lt;<a href="mailto:jeffrey.ratcliffe@gmail.com">jeffrey.ratcliffe@gmail.com</a>&gt;</span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I&#39;ve just upgraded my Hardy desktop to Intrepid and now have network problems.<br>
<br>
This is my /etc/network/interfaces<br>
<br>
auto lo<br>
iface lo inet loopback<br>
<br>
auto usb0<br>
iface usb0 inet static<br>
 &nbsp; &nbsp; &nbsp; address <a href="http://192.168.0.200" target="_blank">192.168.0.200</a><br>
 &nbsp; &nbsp; &nbsp; netmask <a href="http://255.255.255.0" target="_blank">255.255.255.0</a><br>
 &nbsp; &nbsp; &nbsp; network <a href="http://192.168.0.0" target="_blank">192.168.0.0</a><br>
 &nbsp; &nbsp; &nbsp; up iptables -A POSTROUTING -t nat -j MASQUERADE -s <a href="http://192.168.0.0/24" target="_blank">192.168.0.0/24</a> &amp;<br>
 &nbsp; &nbsp; &nbsp; up echo 1 &gt; /proc/sys/net/ipv4/ip_forward &amp;<br>
 &nbsp; &nbsp; &nbsp; up iptables -P FORWARD ACCEPT &amp;<br>
 &nbsp; &nbsp; &nbsp; down iptables -D POSTROUTING -t nat -j MASQUERADE -s <a href="http://192.168.0.0/24" target="_blank">192.168.0.0/24</a> &amp;<br>
<br>
This worked fine with Hardy, but the desktop cannot see the network.<br>
<br>
If I comment out auto usb0 and everything below, I can access the rest<br>
of the network, but then, of course, my FreeRunner no longer has<br>
Internet access.<br>
<br>
Any ideas on how to get both up?</blockquote><div><br>&nbsp;I use the following setup:<br><br>On the Freerunner:<br><br>auto usb0<br>iface usb0 inet static<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address <a href="http://192.168.0.202">192.168.0.202</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netmask <a href="http://255.255.255.0">255.255.255.0</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; network <a href="http://192.168.0.0">192.168.0.0</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gateway <a href="http://192.168.0.200">192.168.0.200</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; up echo -e &quot;nameserver <a href="http://192.168.0.200">192.168.0.200</a>&quot; &gt;/etc/resolv.conf<br>
<br>On the desktop:<br><br>allow-hotplug usb0<br>iface usb0 inet static<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address <a href="http://192.168.0.200">192.168.0.200</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; netmask <a href="http://255.255.255.0">255.255.255.0</a><br><br>The iptables-stuff is set at system startup and always active, no matter if the Freerunner is connected or not. These lines are suitable for iptables-restore:<br>
<br>*filter<br>-A FORWARD -i usb0 -o eth0 -j ACCEPT<br>-A FORWARD -i eth0 -o usb0 -m state --state RELATED,ESTABLISHED -j ACCEPT<br>*nat<br># redirect this to my DNS<br>-A PREROUTING -i usb0 -p udp -m udp --dport 53 -j DNAT --to-destination <a href="http://192.168.7.71">192.168.7.71</a><br>
-A POSTROUTING -o eth0 -j MASQUERADE<br><br>And finally in /etc/sysctl.conf:<br><br>net.ipv4.conf.default.forwarding=1<br><br></div></div><br></div>