iPhone, whether it’s classic 1st generation iPhone or iPhone 3G has built-in at least some form of Internet connection via wireless (WLAN), GPRS, EDGE, 3G UMTS and HSPA GSM connectivity. Especially with the release of iPhone 3G, the broadband speed is considerably faster. So theoretically, iPhone owner can connect and link notebook or laptop computer to iPhone and goes online from PC.

Unfortunately Apple doesn’t officially equip iPhone with such capability as out-of-factory default. However, hackers have managed to come out with idea to turn iPhone into modem as Internet gateway to deliver data to notebook, laptop or other devices, without requiring iPhone modem driver. However, do note that to tether use iPhone 3G as a modem or gateway to browse Internet for other device requires user to jailbreak iPhone 3G, and may break and violate terms of service from mobile service carrier, i.e. AT&T.

The basic for hack to iPhone tethering as modem for laptop’s Internet connection is simple. The key idea is linking the iPhone and the notebook PC or other device via ad hoc Wi-Fi wireless network, run a proxy server on the iPhone, and then tell the computer’s browser to use that proxy, as shown in the following trick.

Step 1: Jailbreak iPhone 3G

Download and install PwnageTool from iPhone Dev Team for Mac OS X or WinPwn for Windows and use the freeware to jailbreak iPhone 3G.

Step 2: Install 3Proxy and Terminal

After jail broke iPhone, a Cydia icon will appear on one of the App pages. Load Cydia, and after self updating by Cydia, go to Install tab -> All Packages. Install both MobileTerminal and 3Proxy, then hit the Home button. The phone will restart and Terminal will be installed on iPHone Home screen.

Step 3: Create Ad-Hoc (Computer-to-Computer) WiFi Wireless Network on Mac or PC

An ad-hoc network or computer-to-computer network is a temporary network used for sharing files, presentations and Internet connections among multiple computers and devices. Thus, it fits the purpose to tether and link to iPhone to share Internet connection.

Create an ad-hoc WiFi network on laptop computer. On a Mac OS X system, ad-hoc wireless network can be created and setup via Airport menu with Create Network link. In Windows Vista, go to Network and Sharing Center, and click on Set up a connection or network, then select Set up a wireless ad-hoc (computer-to-computer) network. In Windows XP, go to Network and Internet Connections category, and select Set up a wireless network for a home or small office (wireless infrastructure network). Name the ad-hoc wireless network with a network name (SSID).

Step 4: Join the Ad-Hoc Wireless Network from iPhone

Go to Wi-Fi Networks Settings in iPhone to join the ad-hoc wireless network created.

Step 5: Locate iPhone IP address on Ad-Hoc WiFi Network

Once connected to the ad-hoc network, click on the blue right arrow at the end of the selected/connected Wi-Fi ad-hoc network in iPhone. The details and information for the network will be shown. Among them is IP address. Record the IP address for later use.

IP Address of iPhone Modem

Step 6: Open Terminal and Run the Proxy Program

On iPhone, open Terminal, and type socks and hit Return to start the 3Proxy proxy server.

If there is no error appears on screen, the SOCKS server will be running on iPhone. Leave the Terminal opens. To hide it, simply hit the Home button to push Terminal to the background.

Step 7: Run Safari on the iPhone and Open a Web Page

Launch Mobile Safari on iPhone and browse to any web page.

Note that this step is important to ensure that iPhone will internally switch itself and fallback to 3G GSM data connection when it fails to get through to Internet using the ad-hoc wireless connection, without dropping or terminating the ad-hoc network, allowing the SOCKS proxy server to transmit and transfer data via 3G network connection. Thus, the page will take a while to load on first access.

Step 8: Configure Web Browser

Run Firefox web browser to configure proxy server for Internet traffic. In Firefox, go to Preferences -> Advanced -> Network -> Settings. Then, fill in the iPhone’s IP address written down from step 5 above into the SOCKS Host field, and enter 1080 as the port number.

Make sure all other proxy fields are blank and/or 0.

Tether iPhone as Modem

Step 9: Tunnel and Forward DNS Resolution Requests Through SOCKS Proxy

3Proxy SOCKS proxy can resolve target DNS names if the application sends domain name resolving requests to the SOCKS proxy. However, each application that requires to go to Internet via SOCKS proxy had to be configured manually, as most program will attempt to resolve a domain name against remote DNS server via HTTP protocol.

Firefox, for one, has such capability to force DNS resolution via SOCKS protocol. To enable such advanced option, type about:config into Firefox URL Location Bar. Change the value for network.proxy.socks_remote_dns preference to true.

The DNS resolution limitation through SOCKS proxy also explains why some applications do not successfully browsing or connecting to Internet websites through tethering iPhone. However, once DNS requests have been cached locally, the domain will work system wide.

Step 10: Terminate SOCKS Proxy Server

After using the Internet connection via iPhone, terminate the SOCKS proxy server running on iPhone by switching back to Terminal, and then press and hold the Home button until Terminal quits, else it may slowly drain the battery life of iPhone.

Up to step 9, user will successfully tether and link iPhone to notebook, laptop or desktop computer to use iPhone as modem to connect to the Internet and browse the web pages. The iPhone as modem hack also works on iPhone variants, including iPhone 3G, iPhone 2G, iPhone 2G with firmware OS 2.0, and iPhone 1G (if it’s what you call it).

Update: There is iPhoneModem can make it easier to tether and use iPhone as modem.

Source: cre.ations.net