Internet On Your Neo FreeRunner (USB Networking)

From GeoSharing

Jump to: navigation, search
Line 24: Line 24:
  address 192.168.0.200  
  address 192.168.0.200  
  netmask 255.255.255.0
  netmask 255.255.255.0
-
* Reboot the network service by running the following command:
+
* Restart the network service by running the following command:
-
  /etc/init.d/networking restart
+
  $ /etc/init.d/networking restart
 +
* Now, you can connect to the openmoko as root via ssh:
 +
$ ssh root@openmoko
== Configuration IP tables ==
== Configuration IP tables ==
 +
 +
In order to make the computer connected to the openmoko forward packets comming from the interface eth1, it is necessary to enable IP forwarding which is deactivated by default in Ubuntu. It is therefore requiered to issue the following commands with administrator (sudo) priviledges :
 +
* First step:
 +
$ gedit /etc/sysctl.conf
 +
* Second step: look for the following line in this file:
 +
#net.ipv4.conf.default.forwarding=1
 +
and uncomment it (remove the # caracter if not already done).
 +
* Third step: This change will be effective at the next reboot, or use the following command to make it effective directly:
 +
sudo sysctl -w net.ipv4.conf.default.forwarding = 1
 +
* Fourth step: it is now time to configure the iptables in order to let the packets go through the gateway (computer connected to the Openmoko):
 +
$ gedit /etc/rc.local
 +
* Fifth step: add these lines:
 +
/sbin/iptables -P FORWARD ACCEPT
 +
/sbin/iptables --table nat -A POSTROUTING -s 192.168.0.202/32 -o wlan0 -j MASQUERADE
 +
where iface corresponds to the interface connected to the internet (wlan0, eth0, eth1, ...). These changes also take effect only after a reboot. To make them effective directly, type the same command in a terminal by replacing '''/sbin/''' by '''sudo'''
== Sources ==
== Sources ==
* http://wiki.openmoko.org/wiki/USB_Networking
* http://wiki.openmoko.org/wiki/USB_Networking
* http://ubuntuforums.org/showthread.php?t=713874
* http://ubuntuforums.org/showthread.php?t=713874

Revision as of 17:18, 11 March 2011

Personal tools
Namespaces
Variants
Actions
Navigation
GeoSharing
Misc
Toolbox