Difference between revisions of "Reverse Tethering"
Jump to navigation
Jump to search
(created new page of reverse tethering (sharing PC's network connection with webos device) howto) |
m (improve formatting) |
||
Line 5: | Line 5: | ||
First on webos device, if it is not done already, enable USBNet. | First on webos device, if it is not done already, enable USBNet. | ||
+ | <pre> | ||
usbnet enable (if usb networking is not already on) | usbnet enable (if usb networking is not already on) | ||
reboot | reboot | ||
+ | </pre> | ||
On linux workstation: (enable NAT, turn on IP forwarding, assign an IP and activate the usb interface) | On linux workstation: (enable NAT, turn on IP forwarding, assign an IP and activate the usb interface) | ||
+ | <pre> | ||
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | ||
echo 1 > /proc/sys/net/ipv4/ip_forward | echo 1 > /proc/sys/net/ipv4/ip_forward | ||
ifconfig usb0 inet 192.168.0.2 up | ifconfig usb0 inet 192.168.0.2 up | ||
− | + | </pre> | |
(On webos device -- use novaterm, ssh, or terminal app) | (On webos device -- use novaterm, ssh, or terminal app) | ||
+ | <pre> | ||
route delete default | route delete default | ||
route delete default | route delete default | ||
route add default gw 192.168.0.2 | route add default gw 192.168.0.2 | ||
− | (optional) echo nameserver 10.0.1.123 > /etc/resolv.conf | + | (optional) |
+ | echo nameserver 10.0.1.123 > /etc/resolv.conf | ||
ping google.com | ping google.com | ||
+ | </pre> |
Revision as of 17:52, 29 December 2009
Sometimes access to a WiFi or bluetooth LAN is unavailable and cellular data is just too slow or doesn't provide you with access to the desired networks.
Reverse tethering is a simple solution to share your PC's network connection with your Pre / webos device (typically over a USB cable via USB networking) It is called "reverse" to distinguish it from what most call tethering, which is sharing your device's mobile provider network with a PC.
First on webos device, if it is not done already, enable USBNet.
usbnet enable (if usb networking is not already on) reboot
On linux workstation: (enable NAT, turn on IP forwarding, assign an IP and activate the usb interface)
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward ifconfig usb0 inet 192.168.0.2 up
(On webos device -- use novaterm, ssh, or terminal app)
route delete default route delete default route add default gw 192.168.0.2 (optional) echo nameserver 10.0.1.123 > /etc/resolv.conf ping google.com