USB networking with Ubuntu 9.04

Matthias Huber matthias.huber at wollishausen.de
Tue Oct 6 21:54:49 CEST 2009


Tony Berth schrieb:
> On Tue, Oct 6, 2009 at 10:00 PM, Frederik Sdun 
> <frederik.sdun at googlemail.com <mailto:frederik.sdun at googlemail.com>> 
> wrote:
>
>     * Tony Berth <tonyberth at googlemail.com
>     <mailto:tonyberth at googlemail.com>> [06.10.2009 18:06]:
>     >    followed as described in:
>     >
>     >    http://wiki.openmoko.org/wiki/USB_Networking
>     >
>     >    -------------
>     >
>     >   Ubuntu 9.04 - the Jaunty Jackalope -- udev
>     >
>     >    One can see /etc/udev/rules.d that a device plugged in on USB
>     will be
>     >    called eth1. Go to system->Administration->Network and add
>     the parameters
>     >    for eth1 < static ip, address 192.168.0.200 mask
>     255.255.255.192 add your
>     >    default gateway>. Thats is all.
>     >
>     >    Tested with Qi bootloader aka official MAC address of the
>     Freerunner : on
>     >    Android Koolu beta 7
>     >
>     >    Carig Philippines --frank 14:11, 17 June 2009 (UTC)
>     >
>     >    ----------
>     >
>     >    and eth1 gets assigned the proper IP address. I can connect
>     to Neo but
>     >    from there I don't have any connection to the 'outside'.
>     Please notice
>     >    that resolv.conf has the correct Opendns IPs!
>     >
>     >    Actually I should face the same problem as described in:
>     >
>     >    http://lists.openmoko.org/nabble.html#nabble-td3119750
>     >
>     >    but the postings there weren't of any help :(
>     >
>     >    Thanks
>     >
>     >    Tony
>     I used the config you can find in [0] and it works.
>
>
>     [0]
>     http://wiki.openmoko.org/wiki/USB_Networking#Debian.2C_Ubuntu_and_others
>     > _______________________________________________
>
>
> but this one 'ties' it in usb0 although it connects as eth1! How can 
> this work?
>
> I also used the following entries in /etc/network/interfaces:
>
> #freerunner3
> allow-hotplug eth1
> iface eth1 inet static
> address 192.168.0.200
> netmask 255.255.255.0
> network 192.168.0.0
> up iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 
> <http://192.168.0.0/24> &
> up echo 1 > /proc/sys/net/ipv4/ip_forward &
> up iptables -P FORWARD ACCEPT &
> down iptables -D POSTROUTING -t nat -j MASQUERADE -s 192.168.0.0/24 
> <http://192.168.0.0/24> &
>
> and didn't work! Openmoko wasn't able to get an IP address at all!
get ip adress ? dont understand this.

but i had to add this two lines to my /etc/ufw/ufw.conf

ufw allow from 192.168.0.202
ufw allow to 192.168.0.202


another trial with iptables needs to load some modules too:

#!/bin/sh

MOKO=192.168.0.202

echo 1 > /proc/sys/net/ipv4/ip_forward
modprobe ipt_MASQUERADE

iptables -I FORWARD -j ACCEPT -d ${MOKO}/32
iptables -I FORWARD -j ACCEPT -s ${MOKO}/32
iptables -I POSTROUTING -t nat -j MASQUERADE -s ${MOKO}/32


-- 
Mit freundlichen Grüssen
Matthias Huber 
Kohlstattstr. 14
86459 Wollishausen
Tel: 08238-7998
LPI000181125

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openmoko.org/pipermail/community/attachments/20091006/e3fd6670/attachment.htm 


More information about the community mailing list