Openmoko Problem

smurfy - phil openmoko at smurfy.de
Fri Nov 14 12:51:12 CET 2008


yes i think so,

My working settings on GTA02, i use the "192.168.10.x" net for my usb
connection, this could differ for you.
192.168.10.2 is my freerunner and 192.168.10.1 my eeepc

root at om-gta02 ~ $ cat /etc/resolv.conf
nameserver 208.67.222.222
nameserver 208.67.220.220

cat /etc/network/interfaces
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

# The loopback interface
auto lo
iface lo inet loopback

# Wireless interfaces
iface wlan0 inet dhcp
wireless_mode managed
wireless_essid any
iface atml0 inet dhcp

# Wired or wireless interfaces
iface eth0 inet dhcp
iface eth1 inet dhcp

# Ethernet/RNDIS gadget (g_ether)
# ... or on host side, usbnet and random hwaddr
auto usb0
iface usb0 inet static
        address 192.168.10.2
        netmask 255.255.255.0
        network 192.168.10.0
        gateway 192.168.10.1

# Bluetooth networking
iface bnep0 inet dhcp

---

on my eeepc i have a script which i execute after connecting usb.

ifconfig usb0 192.168.10.1 netmask 255.255.255.0
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ath0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
iptables -A FORWARD -s 192.168.10.0/24 -j ACCEPT
iptables -A FORWARD -s 172.16.10.0/24 -d 192.168.10.0/24 -j ACCEPT


172.16.10.0 is my local network. with this and some other static routes
on my internet router i can access my freerunner over my eeepc from my
normal workstation.

important lines on your host computer is:

ifconfig usb0 192.168.10.1 netmask 255.255.255.0
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o usb0 -j MASQUERADE
iptables -A FORWARD -s 192.168.10.0/24 -j ACCEPT

phil







More information about the community mailing list