USB Networking

Joel Newkirk freerunner at
Thu Nov 6 23:08:32 CET 2008

On Thu, 6 Nov 2008 17:54:09 +0000, "Matthias Camenzind "
<m.camenzind at> wrote:
> I had also some problems with the Usb networking with ubuntu 8.04. But i
> could solve it with this: ifconfig usb0 netmask
> I had to enter it every time after i connected FR with my Computer or I
> rebooted the FR. But it worked fine. I found this solution in the Getting
> Started Guide for Neo 1973.
> Today network is automatically set up after connecting but today I don't
> know exactly what I did.
> -----Original Message-----
> From: Denis Johnson <denis.johnson at>
> Sent: 11/6/2008 1:06:23 PM
> To: List for Openmoko community discussion <community at>
> Subject: Re: USB Networking
> On Thu, Nov 6, 2008 at 9:06 PM, Tony Berth <tonyberth at>
> wrote:
>> the wiki posted solution was tested by myself on a the currebt debian
> and
>> did work! Are you using the same environment?
> I believe so, I'm using Ubuntu 8.10 but have had this problem since 8.04.

With Ubuntu 8.04 and 8.10 I've had 100% success on four or five different
systems with:

auto usb0
iface usb0 inet static
    post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s
    post-up iptables -I PREROUTING -i usb0 -p udp --dport 53 -j DNAT --to
    post-up echo 1 > /proc/sys/net/ipv4/ip_forward
    post-up iptables -P FORWARD ACCEPT
    pre-down iptables -D POSTROUTING -t nat -j MASQUERADE -s
    pre-down iptables -D PREROUTING -i usb0 -p udp --dport 53 -j DNAT --to

in /etc/network/interfaces, and the fix noted on the wiki at

NOTES: I use on host and on FR, with netmask of
/30 or - to match 'standard' {dumb as I feel it is}
FreeRunner network setup, use on host with as
netmask.  Also, is my local DNS server, hence the DNAT rule
forwarding DNS requests there (which I don't actually need anymore since I
use local dnscache on the FR).  In fact, none of the post-up and pre-down
parts affect me anymore as I utilize a static permanent ruleset to
accomplish this, so I leave them all commented out.

(and yes, 'auto' DOES work, provided the fix linked above is employed, and
works without it some times)


More information about the community mailing list