Get Your Computer Online Using Your iPhone's Data Connection

The best way to put your newly jailbroken iPhone 2.0 to good use is to turn it into a mobile phone modem for your laptop. When tapping out an email or pinching and swiping on the iPhone's web browser just doesn't get the job done—and you want to use the full keyboard and screen on your laptop in a Wi-Fi-less place—you can get your computer online using the iPhone's data connection. We've covered how to "tether" your iPhone before, but now that the iPhone 3G connection is speedier and the jailbreak process updated, here's a refresher course. (Of course, if you're on one of the data-light plans such as Telstra, this could be a really expensive idea - proceed with caution.)

Helpful reader jewdass offered step by step instructions on how to get this done; here they are with annotations and links added.

1. Jailbreak your iPhone 3G (or first gen iPhone running the 2.0 software). Install OpenSSH via Cydia.

2. Create an ad-hoc network on your computer. On Macs, just click on the Wi-Fi icon in the menubar and select "Create Network." On Windows, set up internet connection sharing.

3. Join the iPhone to this network via Wi-Fi as usual.

4. On the iPhone, under Settings->Wi-Fi, select the network you have joined to view connection details. Write down its IP address.

5. From the Mac's Terminal, run the following command:
ssh -ND 9999 [email protected]_IPADDR
but replace IPHONE_IPADDR with the IP you wrote down in step 4. Login. The default root password is alpine; you should really login normally over SSH and change this.

Windows users: the free SSH client Putty will allow you to accomplish this same step. Don't install Cygwin+OpenSSH as some suggest, that's massive overkill.

6. Configure your browser to use a SOCKS5 proxy server at localhost:9999. Here's more on setting up a SOCKS proxy in Firefox; Adam did it on his Mac in Safari.

7. Surf. I've successfully done web browsing and IRC, anything that supports SOCKS4/5 should work. Haven't yet had success with my Citrix client :(

For the curious: The iPhone is joining your Wi-Fi network, but with no internet access on this network it falls back to using 3G for outgoing packets. ssh -ND creates a local proxy server that relays packets from the loopback address on your pc to the iPhone, which dutifully proxies them out the cellular connection.

Browsing is surprisingly fast, 3G really shows its potential here. It's zippier than doing it directly on the iPhone, which I put down to rendering delay.

A more ideal solution of course would be to get the iPhone showing up as a regular access point. I see no reason why this wouldn't be possible, and will be doing some research myself, mostly observing what Unix processes handle this on desktop OS X, and see if they can be compiled from source for the iPhone. In the meantime, the steps to accomplish this are not bad and will definitely serve in a pinch.

Thanks, jewdass!


Comments

    Hey - I will get an iPhone, but basically only if I can do this - what do you think?

    I don't have a mac but I can borrow one on the jailbreak process if I need to, but will the above work with a PC? Anyone that can help - much appreciated!

    I'd like to take advantage of the Virgin 5gb usage tariff...

    Has anyone got this working using the SSH client Putty on Windows Vista ?

      Got this working with Vista, Safari and 3GS, ran into a few snags that weren't mentioned.

      Cygwin is a pretty big install, but works fine after you straighten out the permissions for the files. Since Cygwin is not an actual Unix Shell, there is no root user. You can change the permissions of the entire Cygwin directory through the windows file manager! Just right click pproperties > security > select Users > click Edit > and select Full Access.

      Once you've done that run Cygwin, and type
      cd /
      chmod +r /etc/group
      chmod +r /etc/passwd
      chmod 111 var

      Setup you're internet browser connection settings as mentioned above.

      Modify your firewall settings to allow Cygwin.bat through.

      Then run the 'ssh-host-config' script as mentioned above.

      Hope this helps
      -md

    I am technologically retarded.. and currently have a eeepc701(linux) hooked up to Soul(optus)3g hw220a modem using the gsm network in the sticks.
    Have just purchased an iPhone3g through optus which has 3GB a month as part of plan, and am wondering if anyone knows how to set this up as modem for linux... or failing that if I can just swap the SIM across, use it in my gsm modem, then swap it back?

    Any ideas?

    Hey it is all good to tether but using "socks' many sites come up blank. How can you tether the iphone so that sites like "hotmail" can be accessed???

    I have this "Addition's Iphone Modem 2" and I'm trying to play Final Fantasy XI useing it, its not allowing me to do it. Even though it allows me to look up stuff on the internet, like youtube, newgrounds ect. Why the fuck isnt it working?

    Hi, followed the above directions, but got stuck at the putty bit, do I run putty with the network ip and as ssh, what else do I have to configure in putty to get the cmd window open? Can some one please lay out the steps one by one so I can get this running? Btw I'm connecting jailbroken iPhone 3GS to pc laptop running vista!!! Thanks

Join the discussion!

Trending Stories Right Now