The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Nemo/USBNetworking

From Mer Wiki
< Nemo(Difference between revisions)
Jump to: navigation, search
(Undo revision 2103 by Tanuk2 (Talk) - the advice was bad, because the mac address changes every time the cable is plugged in)
Line 12: Line 12:
 
  echo "echo $NAME_SERVER > /etc/resolv.conf"
 
  echo "echo $NAME_SERVER > /etc/resolv.conf"
 
  echo "route add default gw 192.168.2.14"
 
  echo "route add default gw 192.168.2.14"
 +
 +
Note: for ubuntu users you might find iptables under /sbin

Revision as of 09:28, 28 September 2012

Here is script that is tested on Fedora 15/16 and OpenSUSE 12.1 with Nokia N900/N950/N9.

Connect the device with usb cable to your host pc and run following commands

sudo /sbin/ifconfig usb0 up 192.168.2.14
sudo /usr/sbin/iptables -A POSTROUTING -t nat -s 192.168.2.15/32 -j MASQUERADE
sudo /usr/sbin/iptables -P FORWARD ACCEPT
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
# Rest of these are here just to print something that is needed for the device to get routing work.
NAME_SERVER=`cat /etc/resolv.conf | grep "nameserver" | head -1`
echo "echo $NAME_SERVER > /etc/resolv.conf"
echo "route add default gw 192.168.2.14"

Note: for ubuntu users you might find iptables under /sbin

Personal tools