You are here

iPhone 3.0 tethering with Linux

Keywords: 

iPhone tethering uses standard Bluetooth protocols, so you can tether from Linux. I'm not aware of how you'd do this over USB - for my situation (using the iPhone as connectivity for my CarPC) Bluetooth is ideal.

First install Bluetooth utilities on Linux and ensure you are running a kernel with all Bluetooth support compiled in or otherwise available as modules.
Make sure you have something on Linux that'll prompt you for the PIN - kbluetooth or similar for graphical desktops. Pair the phone and the computer - I did this from the iPhone end - and enter the same PIN on each end. Ensure tethering is enabled and switched on on the iPhone.

You can get the iPhone's address on Bluetooth using 'hcitool scan' while the iPhone is in discovery mode.

On Linux:

modprobe bnep
pand --connect [IPHONE_ADDRESS] --service NAP --autozap

You should now see a new interface connected:

ifconfig bnep0

Depending on your Linux distribution, it may automatically run DHCP (this is how the iPhone gives your computer a NAT'd IP). Otherwise:

dhclient bnep0

(or whatever you use normally)

All done, have fun with Internet everywhere :-)