Today was my first time I used iPhone tethering. Tethering means connecting computer to the internet using iPhone’s cellular connectivity (3G/EDGE). The iPhone connects to the computer via USB cable or Bluetooth and uses as a cellular modem. It’s useful when you’re away with a laptop and no wireless hot spots around.
There are many tutorials out there, however I found most of them misleading (advising to use third party software or jailbreak your iPhone – both unnecessary) and none of them for Linux. This tutorial is really easy and simple.
Step 1 – Enable internet sharing on your iPhone
On your iPhone goto Settings -> General -> Network -> Internet sharing -> On. If “Internet sharing” isn’t shown, open Safari and browse to: http://help.benm.at. On this webpage click on “Tethering”, then select your country and your mobile carrier. Accept the profile and reboot your iPhone. After the reboot “Internet sharing” option is supposed to be shown. In my case, my carrier wasn’t on the list so I generated a custom file (the last option). The APN/User/Password were easily found using Google. However, “Internet sharing” stayed hidden. The funny thing is after I removed the custom profile it magically appeared. My iPhone version is 3.1.2 and it worked. I noticed they have warning for 3.1.3 so watch out if you got it.
Step 2 – Install necessary software on Ubuntu
As always, I provide instructions for Ubuntu. The driver you need is called “ipheth” and it depends on “libimobiledevice”. Now, you can find them both on Lucid’s official repositories. However, only version 0.9.7 of libimobiledevice is there, and while it may be enough for tethering, I recommend using the newer version which can be obtained from Paul McEnery PPA (for Karmic it’s still version 0.9.7):
# sudo add-apt-repository ppa:pmcenery/ppa
Executing: gpg –ignore-time-conflict –no-options –no-default-keyring –secret-keyring /etc/apt/secring.gpg –trustdb-name /etc/apt/trustdb.gpg –keyring /etc/apt/trusted.gpg –primary-keyring /etc/apt/trusted.gpg –keyserver keyserver.ubuntu.com –recv 3AE22276BF4F39C8D6117D7F4EA3A911D48B8E25
gpg: requesting key D48B8E25 from hkp server keyserver.ubuntu.com
gpg: key D48B8E25: public key “Launchpad PPA for Paul McEnery” imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
# ï»¿sudo apt-get update
Now, install the driver (and it’s dependencies, which include the library):
# sudo apt-get install ipheth-utils
Load the driver into running kernel
# sudo modprobe ipheth
At this point if you enter “dmesg” the last line should show something like “usbcore: registered new interface driver ipheth”
Step 3 – Plug your iPhone using USB cable
As soon as you connect your device a new interface should be plumbed, configured and ready to be used (in case you use network manager). You can get list of your interfaces with “ifconfig -a”. On your iPhone there suppose to be label saying “Internet Tethering”. If you don’t use network manager the “Internet Tethering” is triggered when you make DHCP request on that interface (for example, using “dhclient”).
That’s it. As promised, easy and simple. Thanks to Paul McEnery there are plenty of other cool iPhone related stuff you can install from his PPA (on Lucid).
17 responses to “iPhone tethering with Ubuntu”
[…] There are many tutorials out there, however I found most of them misleading (advising to use third party software or jailbreak your iPhone â€“ both unnecessary) and none of them for Linux. This tutorial is really easy and simple. More here […]
Thanks for the post. I thought iPhone tethering on Ubuntu would have been so complicated, that I didn’t even think to try it previously. Again, thanks for sharing such a useful guide. ^^
[…] Posted by rbwatson1 on June 14, 2010 There are many tutorials out there, however I found most of them misleading (advising to use third party software or jailbreak your iPhone â€“ both unnecessary) and none of them for Linux. This tutorial is really easy and simple. More here […]
[…] Today was my first time I used iPhone tethering. Tethering means connecting computer to the internet using iPhone's cellular connectivity (3G/EDGE). The iPhoneÂ connects to the computer via USB cable or Bluetooth and uses as a cellular modem. It's useful when you're away with a laptop and no wireless hot spots around. There are many tutorials out there, however I found most of them misleading (advising to use third party software or jailbreak your … Read More […]
Thnx for the help.. It worked
Worked for me also! Thanks! Now I need to link my eth1 and my usb port so I can share the Iphone with other computers. But it says I am using eth1, I am confused I thought it was using the usb port.
The ipheth kernel module plumbs a new network interface. The operating system treats it just as any other network interface, however it communicates with the iPhone over USB. If you want to enable internet sharing, the fact it’s over USB shouldn’t make any difference.
Can anyone here wake me through how to actually do this? Trying to decipher the IT lingo….
Can you be more specific?
Start by Opening Terminal and downloading the software.
worked for me too iphone 3gs 4.0x ubuntu 10.04 or smthing
When I’m connecting using iPhone on USB like this (works great! Thanx for the post!) i get an eth1: device… I would like to route some traffic (an ssh-tunnel) through that. But when as soon as I enable the normal eth0 lan network my tunnel over eth1: seems to drop. Is the internet sharing automatically shut down by the iPhone when another network is detected? Any pointers?!?
Btw: From Ubuntu 10.10 just add “ipheth-util” from synaptic and all software is installed (I needed a reboot though before it worked)…
Hmmmm. I’m SOL for this one. Just can’t get through the step 1. The rest is fine. Any alternatives? Thank you.
Ah, it is my fault to have updated my iOS to 4.2.1 It seems Apple has took out that functionality. arrrg. Can I down-grade?
Can anyone confirm that this works with os 4.2.1?
I followed the instructions but I don’t get a new device with ifconfig -a.
Did you even get the iPhone to show the tethering option in the Network setting? I can attest this method does not work with iOS 4.2.1
I have 4.2.1 I did not see the tether option until I removed the ben help profile. Should I reload ben? Spool close I can almost….