Difference between revisions of "IPhone Share Internet"

From ivc wiki
Jump to navigationJump to search
Line 1: Line 1:
== Ad-Hoc Network ==
It's possible to share the EDGE connection on the iPhone using the Wifi connection as a tunnel.
To connect the iPhone and laptop to gether, a Ad-Hoc network has to be configured. In Windows this can be done, but it's not as practical as it should be.


== Setup Ad-Hoc Network ==
The iPhone and laptop can be connected directly using an Ad-Hoc network. This can easily be set up in Windows.
Open the wireless network adapter properties, click the 'Wireless Networks'-tab.
[[Image:Eee iphoneshare wireless properties.png]]
At the bottom, to into the 'Advanced' settings, and select ''Computer-to-computer (ad hoc) networks only''.
[[Image:Eee iphoneshare wireless properties advanced.png]]
Now, add an ad-hoc network by clicking ''Add'', typing a SSID like ''iPhonePipe'', and selecting ''Disable'' in the data encryption drop-down.
[[Image:Eee iphoneshare wireless properties add network.png]]
There should be only one network in the ''Preferred networks'' list, e.g. ''iPhonePipe, click ''Ok'' to commit the changes.
[[Image:Eee iphoneshare wireless properties ready.png]]
== Configure iPhone ==
With the ad-hoc network set up, connect the iPhone to the new ad-hoc network.
To keep the iPhone from dropping the Wifi ad-hoc connection, disable ''Auto-lock'' under ''Settings'', ''General'', ''Auto-lock'', and set it to ''Never''.
[[Image:Eee iphoneshare iphone autolock.png]]
To connect to the ad-hoc network, go to ''Settings'' and ''Wi-Fi'', wait a moment for the scan to complete, and select the new ad-hoc network, e.g ''iPhonePipe''
[[Image:Eee iphoneshare iphone wifi.png]]
Once the iPhone is connected with a check next to the name, touch the blue arrow to find the IP address for the iPhone connection.
[[Image:Eee iphoneshare iphone wifi ipaddress.png]]
Alternatively, set a static IP address to avoid having to refresh and wait for the pseudo DHCP IP to be set.
[[Image:Eee iphoneshare iphone wifi ipaddress static.png]]
== PuTTY Tunnel ==
Set up a tunnel via SSH to allow the data requests to be sent to the iPhone end of the ad-hoc connection. The SSH server on the iPhone acts as a SOCKS proxy server.
* [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Download PuTTY]
Open a new session and type the IP address from the iPhone in the ''Host Name (or IP address)''-field.
[[Image:Eee iphoneshare putty newsession.png]]
Next, go to the ''Connections'', ''SSH'', and ''Tunnels'' screen. Add a new forwarded port, first select ''Dynamic'' destination, and then enter a random port number in the ''Source Port''-field, e.g. 9999, leave ''Destination''-field empty, and click ''Add'' to add the new entry to the list.
[[Image:Eee iphoneshare putty tunnel.png]]
Now, click ''Open'' to start the SSH the connection to the iPhone. Accept the key challenge and login using ''root'' as the login. If the password of the jailbroken iPhone hasn't been changed, the password is either ''alpine'' or ''dottie''.
If you see a ''#'' character and get a command-line, everything is good.
[[Image:Eee iphoneshare putty loggedin.png]]
== Configure Applications ==
The Internet sharing only works in programs what allow you to set a SOCKS proxy server, e.g. Firefox, Pidgin, Internet Explorer, MSN Messenger, and more.
To surf via EDGE using Firefox, change the proxy settings in ''Options'', ''Advanced'', ''Network'', and ''Settings''. Select  ''Manual proxy configuration'' and at the second to last field, ''SOCKS Host'', enter ''localhost''. The PuTTY client is the local tunnel to the iPhone, and therefore the localhost-address is used when interfacing with the tunnel.
Use the port set as ''Source Port'' in PuTTy, e.g. 9999, in the port field.
[[Image:Eee iphoneshare firefox options.png]]
Another thing to fix, as the iPhone does not resolve DNS queries yet (google.com -> 64.233.167.99), the Firefox '''network.proxy.socks_remote_dns''' settings has to be set to '''true'''. In the address bar, enter ''about:config''. Then in the filter bar enter ''socks_remote_dns'' and double click the preference to change ''false'' to ''true. Re-open Firefox.
[[Image:Eee iphoneshare firefox socksdns.png]]
Now, try to open www.google.com and if it doesn't load as fast as normal you know you're on EDGE. :)
If you encounter problems, as you probably will, try to re-initialize the process and install the BIND DNS server on the iPhone below.


== References ==
== References ==
* [http://lifehacker.com/software/feature/use-your-iphones-internet-connection-on-your-laptop-327066.php Use Your iPhone's Internet Connection On Your Laptop]
* [http://lifehacker.com/software/feature/use-your-iphones-internet-connection-on-your-laptop-327066.php Use Your iPhone's Internet Connection On Your Laptop]
* [http://thinkhole.org/wp/2006/05/10/howto-secure-firefox-and-im-with-putty/ HOWTO: Secure Firefox and IM with PuTTY]
* [http://thinkhole.org/wp/2006/05/10/howto-secure-firefox-and-im-with-putty/ HOWTO: Secure Firefox and IM with PuTTY]

Revision as of 00:49, 27 March 2008

It's possible to share the EDGE connection on the iPhone using the Wifi connection as a tunnel.

Setup Ad-Hoc Network

The iPhone and laptop can be connected directly using an Ad-Hoc network. This can easily be set up in Windows.

Open the wireless network adapter properties, click the 'Wireless Networks'-tab.

File:Eee iphoneshare wireless properties.png

At the bottom, to into the 'Advanced' settings, and select Computer-to-computer (ad hoc) networks only.

File:Eee iphoneshare wireless properties advanced.png

Now, add an ad-hoc network by clicking Add, typing a SSID like iPhonePipe, and selecting Disable in the data encryption drop-down.

File:Eee iphoneshare wireless properties add network.png

There should be only one network in the Preferred networks list, e.g. iPhonePipe, click Ok to commit the changes.

File:Eee iphoneshare wireless properties ready.png

Configure iPhone

With the ad-hoc network set up, connect the iPhone to the new ad-hoc network.

To keep the iPhone from dropping the Wifi ad-hoc connection, disable Auto-lock under Settings, General, Auto-lock, and set it to Never.

File:Eee iphoneshare iphone autolock.png

To connect to the ad-hoc network, go to Settings and Wi-Fi, wait a moment for the scan to complete, and select the new ad-hoc network, e.g iPhonePipe

File:Eee iphoneshare iphone wifi.png

Once the iPhone is connected with a check next to the name, touch the blue arrow to find the IP address for the iPhone connection.

File:Eee iphoneshare iphone wifi ipaddress.png

Alternatively, set a static IP address to avoid having to refresh and wait for the pseudo DHCP IP to be set.

File:Eee iphoneshare iphone wifi ipaddress static.png

PuTTY Tunnel

Set up a tunnel via SSH to allow the data requests to be sent to the iPhone end of the ad-hoc connection. The SSH server on the iPhone acts as a SOCKS proxy server.

Open a new session and type the IP address from the iPhone in the Host Name (or IP address)-field.

File:Eee iphoneshare putty newsession.png

Next, go to the Connections, SSH, and Tunnels screen. Add a new forwarded port, first select Dynamic destination, and then enter a random port number in the Source Port-field, e.g. 9999, leave Destination-field empty, and click Add to add the new entry to the list.

File:Eee iphoneshare putty tunnel.png

Now, click Open to start the SSH the connection to the iPhone. Accept the key challenge and login using root as the login. If the password of the jailbroken iPhone hasn't been changed, the password is either alpine or dottie.

If you see a # character and get a command-line, everything is good.

File:Eee iphoneshare putty loggedin.png

Configure Applications

The Internet sharing only works in programs what allow you to set a SOCKS proxy server, e.g. Firefox, Pidgin, Internet Explorer, MSN Messenger, and more.

To surf via EDGE using Firefox, change the proxy settings in Options, Advanced, Network, and Settings. Select Manual proxy configuration and at the second to last field, SOCKS Host, enter localhost. The PuTTY client is the local tunnel to the iPhone, and therefore the localhost-address is used when interfacing with the tunnel.

Use the port set as Source Port in PuTTy, e.g. 9999, in the port field.

File:Eee iphoneshare firefox options.png

Another thing to fix, as the iPhone does not resolve DNS queries yet (google.com -> 64.233.167.99), the Firefox network.proxy.socks_remote_dns settings has to be set to true. In the address bar, enter about:config. Then in the filter bar enter socks_remote_dns and double click the preference to change false to true. Re-open Firefox.

File:Eee iphoneshare firefox socksdns.png

Now, try to open www.google.com and if it doesn't load as fast as normal you know you're on EDGE. :)

If you encounter problems, as you probably will, try to re-initialize the process and install the BIND DNS server on the iPhone below.

References