Documentation, modules, keyboard, loading

Shawn Rutledge shawn.t.rutledge at gmail.com
Tue Sep 11 20:17:51 CEST 2007


On 9/9/07, Cindy Mottershead <cindy at mottershead.us> wrote:
> Once you can communicate between the laptop and phone (both ways), you can set up your resolv.conf on the phone
> and follow the instructions for your laptop distributions in "Automatic method" to enable the phone to communicate with the
> internet.

Specifically this howto describes how to get your Linux box to act as
a router; it's written from the perspective of routing a LAN to the
Internet, but the principles are the same as routing from USB to the
LAN, so the phone can connect to the Internet over USB:

http://www.gentoo.org/doc/en/home-router-howto.xml

(It's Gentoo specific but you can translate for your distro)

The NAT stuff in section 5.2 (set up via iptables) is probably what
you are missing.  It's OK that NAT is being done twice.  My phone
sends a packet over USB to my Linux box, which changes the source
address on that packet so it looks like it came from the Linux box and
sends it to the router.  The router changes the source address so the
packet looks like it came from there, and sends it out on the
Internet.  When the reply packet is received, the router realizes it's
a reply intended for the Linux box, so changes the destination address
and forwards it on; then the Linux box realizes it's intended for the
phone and sends it there.  (At least that's my understanding of how
NAT works)

If you have your own name server anywhere on your LAN, you can put
that address in resolv.conf.  Otherwise if you usually use your ISP's
DNS server, put that.



More information about the device-owners mailing list