How to tether your iPhone 3G and browse the web using your 3G connection

Tags: 2.0, apple, cydia, dev team, iphone, iphone 3g, jailbreak, jailbroken, proxy, saurik, socks, tethering
Thanks to the excellent work of the iPhone Dev Team and the porting work of Jay Freeman as well as the authors of 3Proxy, it is now possible to "tether" your iPhone 3G and use its Internet connection on your laptop.

Warning - Tethering your iPhone is against the iPhone data plan terms. AT&T could slap you with huge fees if you overuse this. I recommend only using it during emergencies.

Here's the basic rundown:
- Jailbreak your iPhone 3G
- Install 3Proxy and Terminal
- Create an ad-hoc Wi-fi network using your laptop
- Join the network with your iPhone
- Find the iPhone's IP address
- Open Terminal and run the proxy program
- Open Safari on your iPhone and open a web page
- Configure your browser to use the proxy

I will be using a Mac and Firefox to demonstrate, but the principles carry over to other platforms.

Step 1: Jailbreak your iPhone

This is a big topic. Head to the the iPhone Dev Team blog for instructions for this. You will have to restore your phone, which makes this a process that can take 2 or more hours. Make sure you do it before you really need to tether.

Step 2: Install 3Proxy and Terminal

During the jailbreak, Cydia should have appeared on one of your app pages:
Use it and let Cydia load and self-update.
Then head to Install, All Packages, then find MobileTerminal and 3Proxy (3Proxy is at the bottom). Install both and hit your Home button. Your phone will restart and you'll see Terminal installed on your home screen. 3Proxy isn't a GUI app and as such won't have an icon.

Step 3: Create an ad-hoc Wifi network using your laptop

Using whatever wireless software suite you have, create an ad-hoc network. On a Mac it's in the Airport menu, under "Create network...". Name it something inconspicuous. I called mine "baladoux".
On your iPhone, join the ad-hoc network.

Step 4: Find your iPhone's IP address
Then, hit the blue arrow next to it, and wait for your IP address to show up:
Memorize (or write down) this IP address. You will need it later.

Step 5: Open Terminal and run the proxy program

Simple enough. Open Terminal, type "socks" and hit return.

Nothing will appear to happen, but the SOCKS server will be running. You can hit the home button to push Terminal to the background (remember to terminate it later, by switching back to Terminal and holding the Home button until it closes).

Step 6: Open Safari on the iPhone and open a web page

Any page will do. I recommend cre.ations.net:
This step is important. The page will take a while to load. When Safari realizes it can't get to the Internet using the ad-hoc Wifi, it will do some internal magic to switch back to 3G for Internet while still on your ad-hoc network. That lets the proxy do its thing.

Step 7: Configure your browser

In Firefox, head to Preferences, and under Advanced, Network, hit Settings:
Then, fill in the iPhone's IP address (which you memorized earlier) into the SOCKS Host field, and put 1080 as the port number. Make sure all other proxy fields are blank and/or 0 as shown:
Then, since the proxy doesn't forward DNS, you will also have to change an advanced option in Firefox. In the Firefox URL bar, enter "about:config" and hit Enter:
In Filter, type "socks" and then double-click "network.proxy.socks_remote_dns" to make its value "true".

That should be all you need! Firefox should be able to browse the Internet through your iPhone's 3G connection.

Tethering costs a lot of battery life on the iPhone so make sure you have it plugged in (or use the APC UPB10 portable USB battery charger). When you're done, make sure to quit Terminal by opening it back up and pressing and holding the Home button until it quits.

Return to Nate True's blog

Comments:

Posted by bizzarefoods 1 year ago ( 22-Jul-2008 01:20:36 )

You can change the settings on the wifi network from system prefs so your whole computer can gain acees this way

Posted by dctwo 1 year ago ( 24-Jul-2008 12:22:56 )

Do you have to repeat the entire process every time you wish to tether? For instance, i'm running a CarPC. If I leave the settings in firefox, would it be as simple as starting up terminal and starting socks then loading a web page to initiate tethering everytime? Or would I have to recreate the ad-hoc network each time and manually connect?

Posted by urrl 1 year ago ( 25-Jul-2008 13:53:31 )

Using my Macbook Pro after getting it to tether I shut the MBP down and held the HOME button when in TERMINAL to shut it off on the iPhone. Next I clicked on terminal, entered "socks" and booted up my MBP. I made sure the network was switched on in the AIRPORT menu and was able to surf the net without doing anything else. Am I dreaming? It works great so far and it's easy to use. This is super cool stuff!

Somehow it worked in Safari but it stopped. How do I get it to work in Safari?

This comment was edited at 2008-07-25 21:07:49


Posted by urrl 1 year ago ( 26-Jul-2008 12:15:11 )

Update: only downside so far is a disconnection while receiving phone calls. But I can now have both Macbook Pro and Powerbook tethered by Wi-Fi to my iPhone 3G at the same time with speeds about TWICE as fast as my Sprint EX720 Expresscard in my home location. Wow.

Remember though once you actually turn your iPhone off the next time it restarts it has a different IP address, so if you want to tether without go any big adjustments just hit the top button keep the iPhone in standby mode till you need it again.

EDIT: WOW, the internet connection is not broken even in standby mode!

This comment was edited at 2008-07-26 12:20:27


Posted by urrl 1 year ago ( 27-Jul-2008 07:24:33 )

On my MBP I got on net in OSX then shut down, reboot into Bootcamp Windows and in firefox do the settings thing to enter IP address and the about:config thingy. It seems to work fine. I am posting this from Bootcamp Windows on my Macbook Pro. Amazing.
EDIT: I think this was because I had my Powerbook maintaining the wireless connection. Later I found I cant do it on my MBP in Bootcamp Windows without the Powerbook tethering with the iPhone.

This comment was edited at 2008-07-29 09:52:47


Posted by jdlorinser 1 year ago ( 27-Jul-2008 18:50:04 )

Can ANYONE figure out how to get this working with Internet Explorer?? There is this one website that I use everyday for work and that site does not work on Firefox. I would Greatly appreciate any input!

Posted by urrl 1 year ago ( 29-Jul-2008 06:37:08 )

I cannot access iTunes store in OSX. This is very odd to me.
Difficulty accessing Hotmail in OSX
Difficulty using Safari but not impossible.


Posted by urrl 1 year ago ( 29-Jul-2008 07:36:37 )

OK Safari is good. System Prefs showed the correct IP address till I checked FTP Proxy and then re-checked SOCKS Proxy numbers; I noticed they had changed. Then I put in correct numbers for Socks Proxy and unchecked FTP Proxy. Works fine now.

Posted by mklemm 1 year ago ( 02-Aug-2008 14:47:45 )

Is there a way to do it without the SOCKS proxy, maybe by adding a route to forward packets between the Wi-Fi and 3G interfaces, and a NAT configuration? I'd guess that the SOCKS approach will not work well if you want to set up an ipsec VPN over that connection.

Posted by urrl 1 year ago ( 05-Aug-2008 21:37:43 )

Interesting observation:
According to Speakeasy the Terminal tether is 1.6 times faster than Netshare according to my calculations, at least in my area.

Also at certain times I notice with Ne5share; Firefox will ask to download a file instead of downloading a web page, but Terminal downloaded the page as it was supposed to do. I only did this once and will test more on this topic.

This comment was edited at 2008-08-05 21:49:28


Posted by urrl 1 year ago ( 05-Aug-2008 21:48:06 )

Definitely on my MBP running Tiger Netshare wants to download files instead of load web pages at least part of the time.
Terminal does not seem to have this problem at all so far.

Posted by tamtlq 1 year ago ( 27-Aug-2008 10:25:57 )

i need help .. I tether my phone wit firefox on windows xp and now my iphone is stuck on the edge network it wont go back to 3g network whrn i try to use youtube or surf the web on safari on the phone.. How to i go back to 3g on the phone.. I tried reset all network setting on the phone but it still stuck on egde n not going back to 3g

Posted by tamtlq 1 year ago ( 27-Aug-2008 12:08:46 )

hmmmmn i got itback to 3g after a simple phone call... Hmnnn no idea

Posted by bagman 1 year ago ( 15-Sep-2008 15:22:36 )

If you're running Windows 98 SE, use FreeCap 3.12 (only FreeCap 3.11-3.16 won't crash Windows 9x; 3.12 adds remote DNS resolution which you need for tethering, but 3.13-3.16 seems to break Remote Desktop Client.) For Hotmail, use Mobile Hotmail http://mobile.live.com/hm .

I'm still having trouble with the ends of data transfers being cut off, especially using passive FTP.
Does anyone here have any idea what's causing this?

Posted by borisyim 1 year ago ( 21-Sep-2008 10:50:12 )

Tethered iPhone to the web with $5.99 T-zones internet hack (for T-mobile users):
http://www.modmyi.com/forums/t-mobile/294291-has-anybody-gotten-tethered-iphone-web-5-99-tzones-internet-hack.html#post2252691

Posted by skatejunk 1 year ago ( 07-Nov-2008 09:33:08 )

I'm trying to tether my original iPhone (unlocked to t-mobile and running on EDGE with t-zones hack) to my MBP. I went through all the steps and it seems to tether, but when I try to go to a website I get a Error 500 Internal Server Error. here's the error message:

HTTP ERROR: $CODE$
$MESSAGE$
RequestURI=/

any pointers?

Posted by visionaire 48.1 weeks ago ( 09-Mar-2009 09:50:07 )

What are the download speeds when you tether to laptop?


http://www.ctgoldandsilver.com

This comment was edited at 2009-03-09 09:50:34


Posted by hetyr 18.7 weeks ago ( 01-Oct-2009 02:49:10 )

Thanks for safari. All ok
http://www.trustcanadianhealthcare.com/

Log in or register to post comments.
You are not logged in.
Log inRegister now!