白い熊
03-11-2010, 10:47 AM
I'm goin' nuts, have been messing with this for hours now, and though I think it's something stupid, can't figure out what I've messed up...
I just wanna achieve the following: my Debian PC is connected to the internet over a Wifi connection. Wanna plug in the N900 with the USB cable and ssh access it.
Had it working easily, don't know what's changed.
Basically now, as per:
http://wiki.maemo.org/N900_USB_networking
http://wiki.maemo.org/USB_networking#Host_USB_Network_Configuration
and
http://pc-connectivity.garage.maemo.org/2nd_edition/node5.html#SECTION00051000000000000000
I've added to /etc/network/interfaces on the PC:
auto usb0
allow-hotplug usb0
mapping hotplug
script grep
map usb0
iface usb0 inet static
up iptables -t nat -A POSTROUTING -s 192.168.2.15 -j MASQUERADE
up echo 1 > /proc/sys/net/ipv4/ip_forward
down iptables -t nat -D POSTROUTING -s 192.168.2.15 -j MASQUERADE
down echo 0 > /proc/sys/net/ipv4/ip_forward
Now, when I plug in the USB cable, ifconfig gives me for USB:
usb0 Link encap:Ethernet HWaddr 12:5e:6e:98:55:a5
inet6 addr: fe80::105e:6eff:fe98:55a5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:3525 (3.4 KiB)
and I can ping google.com no prob. Can't ping 192.168.2.15
The moment I run # ifconfig usb0 192.168.2.14 I can ping 192.168.2.15 but pinging google.com gives me, after a couple of secs wait:
ping: unknown host google.com
After unplugging the USB, all goes back to normal.
WTF? What am I missing?
I just wanna achieve the following: my Debian PC is connected to the internet over a Wifi connection. Wanna plug in the N900 with the USB cable and ssh access it.
Had it working easily, don't know what's changed.
Basically now, as per:
http://wiki.maemo.org/N900_USB_networking
http://wiki.maemo.org/USB_networking#Host_USB_Network_Configuration
and
http://pc-connectivity.garage.maemo.org/2nd_edition/node5.html#SECTION00051000000000000000
I've added to /etc/network/interfaces on the PC:
auto usb0
allow-hotplug usb0
mapping hotplug
script grep
map usb0
iface usb0 inet static
up iptables -t nat -A POSTROUTING -s 192.168.2.15 -j MASQUERADE
up echo 1 > /proc/sys/net/ipv4/ip_forward
down iptables -t nat -D POSTROUTING -s 192.168.2.15 -j MASQUERADE
down echo 0 > /proc/sys/net/ipv4/ip_forward
Now, when I plug in the USB cable, ifconfig gives me for USB:
usb0 Link encap:Ethernet HWaddr 12:5e:6e:98:55:a5
inet6 addr: fe80::105e:6eff:fe98:55a5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:3525 (3.4 KiB)
and I can ping google.com no prob. Can't ping 192.168.2.15
The moment I run # ifconfig usb0 192.168.2.14 I can ping 192.168.2.15 but pinging google.com gives me, after a couple of secs wait:
ping: unknown host google.com
After unplugging the USB, all goes back to normal.
WTF? What am I missing?