<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>All The Naughty Bits &#187; iPhone</title>
	<atom:link href="http://rogerbush.wordpress.com/category/iphone/feed/" rel="self" type="application/rss+xml" />
	<link>http://rogerbush.wordpress.com</link>
	<description>Programming Jiu-Jitsu for the Aspiring Linux Hacker</description>
	<lastBuildDate>Fri, 15 Aug 2008 18:07:19 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='rogerbush.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/584d8337c14375b7eec37c4fcfcb8b56?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>All The Naughty Bits &#187; iPhone</title>
		<link>http://rogerbush.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://rogerbush.wordpress.com/osd.xml" title="All The Naughty Bits" />
		<item>
		<title>How To Tether The iPhone 3G To A Mac Laptop</title>
		<link>http://rogerbush.wordpress.com/2008/08/11/how-to-tether-the-iphone-3g-to-a-mac-laptop/</link>
		<comments>http://rogerbush.wordpress.com/2008/08/11/how-to-tether-the-iphone-3g-to-a-mac-laptop/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 22:49:23 +0000</pubDate>
		<dc:creator>rogerbush</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[3proxy]]></category>
		<category><![CDATA[Ad Hoc Wifi]]></category>
		<category><![CDATA[BTKeyMini]]></category>
		<category><![CDATA[Cell Phone]]></category>
		<category><![CDATA[iPhone 3G]]></category>
		<category><![CDATA[Jailbreak]]></category>
		<category><![CDATA[Laptop]]></category>
		<category><![CDATA[Laptop Wireless Card]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[MacAlly]]></category>
		<category><![CDATA[Macintosh]]></category>
		<category><![CDATA[MobileTerminal]]></category>
		<category><![CDATA[Modem]]></category>
		<category><![CDATA[Tethering]]></category>

		<guid isPermaLink="false">http://rogerbush.wordpress.com/?p=9</guid>
		<description><![CDATA[Today&#8217;s Slightly Naughty Post:  Avoid The $60/month charge for Laptop Wireless Connectivity By Tethering Your iPhone





In today&#8217;s post, I&#8217;ll show how to configure your iPhone for &#8220;tethering&#8221; to act as a cellular modem for your laptop.  AT&#38;T does not provide a tethering option for the iPhone and has no official plans to do [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogerbush.wordpress.com&blog=2869039&post=9&subd=rogerbush&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>Today&#8217;s Slightly Naughty Post:  Avoid The $60/month charge for Laptop Wireless Connectivity By Tethering Your iPhone</strong></p>
<p></br><br />
<!-- AddThis Button BEGIN --><br />
<a href="http://www.addthis.com/bookmark.php" target="_blank"><img src="http://s9.addthis.com/button1-share.gif" width="125" height="16" border="0" alt="Bookmark and Share" /></a><br />
<!-- AddThis Button END --><br />
</br></p>
<div id="attachment_32" class="wp-caption alignnone" style="width: 210px"><a href="http://rogerbush.files.wordpress.com/2008/08/img_0009.png"><img src="http://rogerbush.files.wordpress.com/2008/08/img_0009.png?w=200&#038;h=300" alt="Unix Command-Line From A Jailbroken iPhone" width="200" height="300" class="size-medium wp-image-32" /></a><p class="wp-caption-text">Unix Command-Line From A Jailbroken iPhone</p></div>
<p>In today&#8217;s post, I&#8217;ll show how to configure your iPhone for &#8220;tethering&#8221; to act as a cellular modem for your laptop.  AT&amp;T does not provide a tethering option for the iPhone and has no official plans to do so, despite having one for the Blackberry which costs an additional $30 ($60 total).  Note that tethering the iPhone does constitute a violation of the Terms of Service (TOS), which if detected might require paying an extra $30 (or possibly worse).  However, if you want to use a laptop for remote work in the U.S., the only currently authorized means of doing this is to get a separate cell modem account, at an additional cost of $60 per month.</p>
<p>Tethering requires jailbreaking your iPhone, a relatively simple and foolproof process which may nonetheless make you slightly nervous.  This allows loading a cornucopia of unofficial software onto the iPhone, as well as access to the underlying modified FreeBSD system (e.g. via command-line).  Once this is done we can put a socks proxy server on the iPhone, which will forward requests from the laptop received over an ad hoc Wifi network.  This requires a little bit of configuration.</p>
<p>When comparing a tethered iPhone to a dedicated laptop wireless card, the iPhone has far less effective bandwidth (33%-50%) and far higher error rates, particularly in signal challenged locations.  The better performance of the dedicated card is partly due to the card&#8217;s specialized, dedicated processor.  Further, the iPhone has some minor reliability problems due to uncoordinated software components which occasionally stomp on each other.  A top-of-the-line, dedicated wireless card is far more reliable in situations with higher error rates.  If you rely heavily on a laptop with remote access for work, you&#8217;ll likely be happier with a dedicated card, despite the fairly high, extra monthly fee.</p>
<p>An alternative to tethering is to use an external keyboard with the iPhone in landscape mode for text entry.  For example, MacAlly is readying a bluetooth enabled keyboard called the BTKeyMini.  This is likely useful enough for writing short documents, long emails, and remote ssh.  </p>
<p>Despite these considerations, tethering your laptop to your iPhone does have benefits.  For the occasional cafe that lacks Wifi, the iPhone would likely have a strong signal, and thus provide a decent connection without extra cost.</p>
<p><strong>I Don&#8217;t Think Netshare Is Coming Back to the App Store</strong></p>
<p>You may heard of nullriver&#8217;s application &#8220;netshare&#8221; which made a brief debut on the App Store only to be removed by Apple a few days later.  According to nullriver, netshare allowed one to easily tether the iPhone to a Laptop.  It was probably taken down because tethering is in violation of AT&amp;T&#8217;s Terms of Service (TOS), the agreement you digitally sign when you get a new account.  Having an officially sanctioned application which allows inexperienced users to tether, and therefore break the TOS, isn&#8217;t desirable from the carrier&#8217;s standpoint.  Considering U.S. carrier&#8217;s, like AT&amp;T, have tightly controlled the types of things people can do with their phones, I wouldn&#8217;t expect this application to be available again on App Store.</p>
<p>An alternative to netshare is provided by this article.  It relies on &#8220;unofficial&#8221; software which we can easily tap into &#8211; no doubt you&#8217;ve heard the term &#8220;jailbreaking&#8221; before.  Today&#8217;s post shows how to tether your iPhone via 3proxy, which is a SOCKS proxy server we can install on any jailbroken iPhone.  No cable is required from the laptop to the iPhone as we will use Wifi.</p>
<p><strong>A Word About Jailbreaking</strong></p>
<p>Jailbreaking your iPhone requires a only a little bit of technical savvy, and is mostly foolproof.  It does require a bit of nerve to overcome the FUD (&#8220;you&#8217;ll brick your iPhone&#8221;).  The truth is that jailbreaking is relatively safe, and tens of thousands of people have done it.  The benefit is you can put software you obtain from outside of Apple&#8217;s App Store.  This let&#8217;s you use your iPhone like a tiny Unix workstation (modified FreeBSD).  While this will probably not get you any girls (actually, you may lose one or two), the thought of having a tiny Unix workstation in your hip pocket&#8230;well, it sends shudders down my spine thinking of it.</p>
<p>I give a link below to the jailbreaking instructions that I followed.</p>
<p><strong>Comparing iPhone Tethering to a Dedicated Laptop Cellular Modem</strong></p>
<p>A dedicated laptop wireless card is far superior to a tethered iPhone both in terms of speed and reliability.  If you require wireless access for your laptop on a regular, extended basis, you should probably get the dedicated card.  Try to get your work to pay for the monthly charges.</p>
<p>I currently have both an iPhone (AT&amp;T) and a Kyocera KPC650 Wireless PC Card (Sprint).  The Kyocera is basically a little cell phone (modem) which plugs into the Type 2 slot on my Mac Laptop.  Running a test from my cubicle in Sunnyvale, the iPhone, which shows 3G and full signal strength, gets 150-350 Kbps.  The Kyocera laptop card gets about 500-700 Kbps.  This speed difference is likely due to the Kyocera card&#8217;s dedicated processor.</p>
<p>Differences between using iPhone tethering and a Dedicated Laptop Wireless Card:</p>
<ol>
<li>The iPhone is about 33% &#8211; 50% of the speed of the latest dedicated laptop cellular modem.</li>
<li>Assuming you are already paying for an iPhone, it will cost you about $60 less per month to use tethering, since you don&#8217;t have to have a separate cell modem account.</li>
<li>iPhone tethering has many more manual setup steps than the dedicated modem.  There are also some problems stemming from independent software components stepping on each other&#8217;s toes.  This occasionally results in manual steps to remedy the situation.</li>
<li>iPhone tethering requires jailbreaking which is not suitable for most people.</li>
<li>iPhone tethering violates the carrier&#8217;s TOS.  While the carrier can detect you are doing something fishy, it&#8217;s not clear what they would do, especially if one uses tethering sparingly.</li>
</ol>
<p><strong>An External Keyboard for the iPhone.  A Viable Alternative to Tethering?</strong></p>
<p>One of the main reasons to tether your laptop is to use it for work.  By &#8220;work,&#8221; I mean sitting in one place and using the mouse and keyboard to produce things like code, emails, omnigraffle diagrams, documents, and powerpoints.  These activities may require special software, and are much easier with a larger screen and keyboard.  Some of these do not require special software, but are much harder without a reasonably sized screen and keyboard.</p>
<p>I often need to use my laptop to access remote development computers via ssh.  If I had a decent keyboard for the iPhone, I could use ssh from the iPhone (ala jailbreak) and get by with viewing the screen in landscape mode on the iPhone.  While the tiny iPhone screen would be a big handicap, I could get by using tools like &#8220;screen&#8221; to multiplex my single tiny terminal window.</p>
<p>MacAlly was recently promoting a product at Macworld Expo called BTKeyMini, a $100 bluetooth mini keyboard that is supposed to pair with the new iPhone.  From the pictures, it looks to be about the size of a folded sheet of paper (8.5&#8243; x 5.5&#8243;), which is a decent size for a mini keyboard.  A company called avalive is accepting pre-orders for $92.  Caveat Emptor &#8211; the product was supposed to be available in March and it&#8217;s currently August.</p>
<p>Online distributor <a href="http://www.avalive.com/MacAlly/BTKeyMini/43579/productDetail.php">www.avalive.com</a> has a pre-order page for the BTKeyMini.</p>
<p><strong>Overview Of The Procedure</strong></p>
<p>Here&#8217;s an overview of what we are going to do:  we&#8217;re going to &#8220;jailbreak&#8221; our phone, which allows us to put non-blessed (by Apple) software on our iPhone, as well as use it as a little Unix workstation (it already <strong>is_</strong> one, we just don&#8217;t have access to it).  Next we&#8217;ll setup the iPhone as a SOCKS proxy server.  This will allow our iPhone to handle web page requests forwarded from our browser.  Then, we&#8217;ll configure our Mac Laptop to use the SOCKS proxy (for Firefox).  Finally, we&#8217;ll configure and turn on the Mac Laptop&#8217;s Wifi network sharing mode, which will allow the laptop to connect to the iPhone.</p>
<p><strong>Step 1:  Jailbreak your iPhone</strong><br />
There are some good descriptions of how to do this elsewhere, so I won&#8217;t repeat them.  Before you start, you&#8217;ll want to make sure your data is backed up.  This automatically happens when you connect your iPhone to iTunes during the syncing process.  If you have setup iTunes to manually manage your media (video and audio files), the syncing will not save it and you will need to manually drag and drop again after jailbreaking (jailbreaking will wipe your iPhone clean and restore it).  Note that you can always reset your phone back to its original state through iTunes, but manually managed media will have to be done through drag-and-drop.</p>
<p>The jailbreaking process &#8220;builds&#8221; a new monolithic software image, which is used to replace whatever is on your iPhone.  This new image takes the official image provided by Apple, and alters it by adding software to it and making small modifications.  One of the programs that is added to your iPhone is the &#8220;cydia loader&#8221; which allows you to select packages (software bundles), and download and install them to your iPhone.</p>
<p>You may have heard of Installer.app, which is by nullriver, the group with the defunct tethering program I mentioned earlier.  As of this posting, Installer.app doesn&#8217;t work for 2.0, so the cydia installer is currently the only option.  Note that cydia also plays nice with App Store, so you can get apps from both places.</p>
<p>Jailbreaking itself takes a bit of getting comfortable with.  After all, you&#8217;re resetting the software on your phone.  While it is fairly safe, it does require a cool technical head if things don&#8217;t fully go according to plan.</p>
<p><strong>Do:</strong></p>
<ol>
<li>Goto <a href="http://www.iclarified.com/entry/index.php?enid=1558">iClarified&#8217;s Jailbreaking Instructions</a> and follow them.</li>
</ol>
<div id="attachment_23" class="wp-caption alignnone" style="width: 210px"><a href="http://rogerbush.files.wordpress.com/2008/08/img_00041.png"><img src="http://rogerbush.files.wordpress.com/2008/08/img_00041.png?w=200&#038;h=300" alt="Cydia Installer on Jailbroken iPhone" width="200" height="300" class="size-medium wp-image-23" /></a><p class="wp-caption-text">Cydia Installer on Jailbroken iPhone</p></div>
<p>Since the iPhone is now jailbroken, we can install a terminal program (to access the shell&#8217;s command-line), and a SOCKS proxy program (3proxy) in the next step.</p>
<p><strong>Step 2:  Install 3proxy and MobileTerminal</strong><br />
3proxy and MobileTerminal are two pieces of software which are not officially blessed by Apple, which is why we had to jailbreak the iPhone.  We&#8217;ll use the new cydia installer to install 3proxy and MobileTerminal:</p>
<p><strong>Do:</strong></p>
<ol>
<li>iPhone Home =&gt; cydia [icon]</li>
<li>Search [icon bottom right] =&gt; type &#8220;3proxy&#8221; =&gt; Select 3proxy =&gt; Install [button upper right]</li>
<li>Search [icon bottom right] =&gt; type &#8220;MobileTerminal&#8221; =&gt; Select MobileTerminal =&gt; Install [button upper right]</li>
</ol>
<p>Installing MobileTerminal puts a new icon on the iPhone called &#8220;terminal&#8221;.  This program gives us access to a command-line for launching programs.  3proxy has no icon associated with it, and therefore must be launched from terminal.  3proxy is a SOCKS server which will listen, by default, on port 1080 for incoming connections.  Later, our browser will connect to the iPhone through this proxy.</p>
<div id="attachment_24" class="wp-caption alignnone" style="width: 210px"><a href="http://rogerbush.files.wordpress.com/2008/08/img_0005.png"><img src="http://rogerbush.files.wordpress.com/2008/08/img_0005.png?w=200&#038;h=300" alt="MobileTerminal Installed.  3proxy is installed but has no icon." width="200" height="300" class="size-medium wp-image-24" /></a><p class="wp-caption-text">MobileTerminal Installed.  3proxy is installed but has no icon.</p></div>
<p><strong>Step 3:  Create An Ad Hoc Wifi Network On The Mac Laptop</strong></p>
<p>Mac Laptop&#8217;s have a feature which peer-to-peer (ad hoc) connection over Wifi, thus eliminating the need for a network switch or router.  Since we&#8217;ll have to flip to this configuration whenever we need to use tethering, we&#8217;ll create a network &#8220;Location&#8221; on the Mac.  Locations are preset network configurations that can enabled by a drop-down selection.</p>
<p>Our new network location, which we&#8217;ll call &#8220;tethering&#8221;, will have static IP settings for the Mac Laptop&#8217;s Airport.  This will consist of setting a static IP and netmask for Airport.  We won&#8217;t fill in settings for the router, otherwise our iPhone might try reaching the Internet over the Airport, and disable 3G.  Neither will we setup a DNS, since DNS requests will get routed through our SOCKS proxy.</p>
<p><strong>Do:</strong></p>
<ol>
<li>Mac Laptop =&gt; System Preferences [docked icon] =&gt; System Preferences [window]</li>
<li>Network [icon] =&gt; Location [dropdown] =&gt; New Location&#8230; [submenu] =&gt; type &#8220;Tether&#8221;</li>
<li>Show [dropdown] =&gt; Airport [menu choice] =&gt; TCP/IP [tab]</li>
<ol>
<li>Configure IPv4: =&gt; Manually [menu choice]</li>
<li>IP Address: =&gt; type &#8220;192.168.0.208&#8243;</li>
<li>Subnet Mask: =&gt; type &#8220;255.255.255.0&#8243;</li>
<li>Leave all the rest blank</li>
</ol>
</ol>
<p>Note that I&#8217;ve chosen to use a Static IP setup rather than DHCP for simplicity.  DHCP should work, but it&#8217;s easier to make things static so that the IPs don&#8217;t change and negate the setup (e.g. if the iPhone&#8217;s IP changes, you&#8217;ll need to change the proxy settings in the Laptop).</p>
<p>Also, I&#8217;ve chosen the IPs 192.168.0.208 and 209.  These make sense for my home network, but you should use any 192.168.0.xxx IPs that make sense for you (using 208 and 209 will, of course, work).</p>
<div id="attachment_38" class="wp-caption alignnone" style="width: 310px"><a href="http://rogerbush.files.wordpress.com/2008/08/network-tether-dialog1.jpg"><img src="http://rogerbush.files.wordpress.com/2008/08/network-tether-dialog1.jpg?w=300&#038;h=280" alt="Static IP Settings for Our New Network Location (Tether)" width="300" height="280" class="size-medium wp-image-38" /></a><p class="wp-caption-text">Static IP Settings for Our New Network Location (Tether)</p></div>
<p>Note that although there is a &#8220;Proxies&#8221; tab, we do not set it because it does not work.  Apparently Apple has made some changes that render this option useless for our purposes.</p>
<div id="attachment_42" class="wp-caption alignnone" style="width: 310px"><a href="http://rogerbush.files.wordpress.com/2008/08/network-tether-proxy-dialog1.jpg"><img src="http://rogerbush.files.wordpress.com/2008/08/network-tether-proxy-dialog1.jpg?w=300&#038;h=277" alt="We do not set the global SOCKS proxy setting (could not figure out how to make this work)." width="300" height="277" class="size-medium wp-image-42" /></a><p class="wp-caption-text">We do not set the global SOCKS proxy setting (setting the appropriate fields didn't seem to work for me).</p></div>
<p><strong>Step 4:  Select &#8220;Tether&#8221; Location, Turn on Airport and Internet Sharing</strong></p>
<p>We need to select the &#8220;Tether&#8221; location we just created, then enable Airport and Internet Sharing.</p>
<p><strong>Do:</strong></p>
<ol>
<li>Mac Laptop =&gt; System Preferences [docked icon] =&gt; System Preferences [window]</li>
<li>Network [icon] =&gt; Location: Tether [dropdown] =&gt; click &#8220;Apply Now&#8221; button</li>
<li>Mac Laptop =&gt; Menu Bar [upper right] =&gt; Airport Icon [dropdown] =&gt; Turn Airport: On</li>
<li>Mac Laptop =&gt; Menu Bar [upper right] =&gt; Airport Icon [dropdown] =&gt; Open Internet Sharing&#8230; =&gt; Sharing Window</li>
<li>Sharing Window =&gt; Internet Tab =&gt; To computers using &#8230; =&gt; Airport [checkbox] </li>
<li>Sharing Window =&gt; Start [button] </li>
</ol>
<p>You should see a little arrow icon in the middle of the Airport icon (triangle made of wavy lines) indicating sharing is enabled.  Note that we did not setup a password for our ad hoc network, but you could easily do this later.</p>
<div id="attachment_48" class="wp-caption alignnone" style="width: 310px"><a href="http://rogerbush.files.wordpress.com/2008/08/internet-sharing-dialog1.jpg"><img src="http://rogerbush.files.wordpress.com/2008/08/internet-sharing-dialog1.jpg?w=300&#038;h=286" alt="Enable Internet Sharing Over Wifi (Ad Hoc Network)" width="300" height="286" class="size-medium wp-image-48" /></a><p class="wp-caption-text">Enable Internet Sharing Over Wifi (Ad Hoc Network)</p></div>
<p><strong>Step 5:  Have iPhone join the Wifi network</strong></p>
<p>Next we&#8217;ll set our iPhone&#8217;s IP to a static address.  We&#8217;ll do this by joining the Ad Hoc Wifi network we&#8217;ve previously activated, and then manually set the IP address associated with the network.</p>
<p><strong>Do:</strong></p>
<ol>
<li>iPhone Home =&gt; Settings [icon] =&gt; Wi-Fi [selection] =&gt; Choose a Network&#8230; =&gt; Find Wifi Network you Created (should be name of your Laptop) =&gt; Select &#8220;Static&#8221; Tab</li>
<ol>
<li>IP Address =&gt; type &#8220;192.168.0.209&#8243;</li>
<li>Subnet Mask =&gt; type &#8220;255.255.255.0&#8243;</li>
</ol>
</ol>
<p>We now have a little LAN.  The iPhone and Laptop are connected by Wifi, and each have a static IP.</p>
<div id="attachment_26" class="wp-caption alignnone" style="width: 210px"><a href="http://rogerbush.files.wordpress.com/2008/08/img_00071.png"><img src="http://rogerbush.files.wordpress.com/2008/08/img_00071.png?w=200&#038;h=300" alt="Select the Mac Laptop\&#39;s Wifi (an Ad Hoc Wifi Network)." width="200" height="300" class="size-medium wp-image-26" /></a><p class="wp-caption-text">Select the Mac Laptop's Wifi (an Ad Hoc Wifi Network).</p></div>
<p>We use Static IP address 192.168.0.209 for the iPhone.</p>
<div id="attachment_29" class="wp-caption alignnone" style="width: 210px"><a href="http://rogerbush.files.wordpress.com/2008/08/img_00082.png"><img src="http://rogerbush.files.wordpress.com/2008/08/img_00082.png?w=200&#038;h=300" alt="iPhone Wifi Static IP Settings" width="200" height="300" class="size-medium wp-image-29" /></a><p class="wp-caption-text">iPhone Wifi Static IP Settings</p></div>
<p><strong>Step 6:  Start the Proxy Server</strong></p>
<p>We&#8217;ll now run the 3proxy (SOCKS proxy) from the terminal program&#8217;s command-line.</p>
<p><strong>Do:</strong></p>
<ol>
<li>iPhone Home =&gt; terminal [icon] =&gt; type &#8220;socks [RETURN]&#8221; at command-line (the [RETURN] is the return key)</li>
</ol>
<p>Nothing visible will happen &#8211; socks is now running, and when it terminates, we will see the prompt again.  It should not terminate unless we force it to, for example, force quitting terminal program, or CTRL-C.  Force quit can be performed by holding the iPhone&#8217;s Home key down for several seconds, while CTRL-C can be performed in MobileTerminal by a stroke across the screen from bottom left to upper right.</p>
<div id="attachment_31" class="wp-caption alignnone" style="width: 210px"><a href="http://rogerbush.files.wordpress.com/2008/08/img_0010.png"><img src="http://rogerbush.files.wordpress.com/2008/08/img_0010.png?w=200&#038;h=300" alt="Launching Socks Proxy (3proxy) Program From Terminal Command-Line" width="200" height="300" class="size-medium wp-image-31" /></a><p class="wp-caption-text">Launching Socks Proxy (3proxy) Program From Terminal Command-Line</p></div>
<p><strong>Step 7:  Make sure the iPhone is using 3G and not Wifi for Internet Access</strong></p>
<p>The way to do this is to open iPhone Safari and load any web page (e.g. http://www.yahoo.com).  If it tries to use Wifi, it will timeout and switch to 3G (or E).  You should see the symbol for the currently active mode (either 3G, E or Wifi symbol) in upper left hand of iPhone display.  When the page loads, the iPhone will have switched from Wifi to 3G or E.</p>
<p><strong>Do:</strong></p>
<ol>
<li>iPhone Home =&gt; Safari [icon] =&gt; type &#8220;www.yahoo.com&#8221; =&gt; Wait until loads (see 3G or Edge icon).</li>
</ol>
<p><strong>Step 8:  Configure Firefox browser to use SOCKS proxy</strong><br />
On laptop from firefox application.</p>
<p><strong>Do:</strong></p>
<ol>
<li>Firefox Application =&gt; Firefox [menu] =&gt; Preferences&#8230; [submenu] =&gt; Pops up window</li>
<li>Window =&gt; Advanced [top icon] =&gt; Network [tab] =&gt; Configure how Firefox connects to the Internet =&gt; Settings&#8230; [button] =&gt; Drops down dialog</li>
<ol>
<li>Select =&gt; Manual Proxy configuration [radio button]</li>
<li>SOCKS Host: =&gt; type &#8220;192.168.0.209&#8243; =&gt; Port: =&gt; type &#8220;1080&#8243;</li>
<li>Select =&gt; SOCKS v5 [radio button]</li>
<li>Note:  Everything else should be clear.  The socks host IP is the IP of the iPhone we previously set.</li>
</ol>
<li>Firefox =&gt; type &#8220;about:config&#8221; in address bar =&gt; type &#8220;dns&#8221; in Filter:</li>
<li>Double click on network.proxy.socks_remote_dns until Value = &#8220;true&#8221;</li>
</ol>
<div id="attachment_44" class="wp-caption alignnone" style="width: 310px"><a href="http://rogerbush.files.wordpress.com/2008/08/firefox-network-dialog.jpg"><img src="http://rogerbush.files.wordpress.com/2008/08/firefox-network-dialog.jpg?w=300&#038;h=236" alt="Firefox Advanced/Network Tab" width="300" height="236" class="size-medium wp-image-44" /></a><p class="wp-caption-text">Firefox Advanced/Network Tab</p></div>
<div id="attachment_45" class="wp-caption alignnone" style="width: 310px"><a href="http://rogerbush.files.wordpress.com/2008/08/firefox-proxy-dialog.jpg"><img src="http://rogerbush.files.wordpress.com/2008/08/firefox-proxy-dialog.jpg?w=300&#038;h=237" alt="Firefox Proxy Dialog (for setting SOCKS proxy)" width="300" height="237" class="size-medium wp-image-45" /></a><p class="wp-caption-text">Firefox Proxy Dialog (for setting SOCKS proxy)</p></div>
<p><strong>Step 9:  Surf the Web</strong></p>
<p>You should now be able to pull up a web page from your laptop.</p>
<p><strong>Step 10:  Set All Your Config Back To Normal</strong></p>
<p>Remember to turn off Internet Sharing, select the &#8220;Automatic&#8221; location (or other location besides &#8220;Tether&#8221;), and set your Firefox preferences back to whatever they were before you manually enabled the proxy (likely &#8220;detect settings automatically&#8221;).</p>
<p><strong>Gotchas</strong></p>
<p>There were several problems I ran into with the tethered iPhone.  The first was that the phone would occasionally get confused and stop using 3G.  This could easily be rectified by going to the iPhone&#8217;s safari browser and loading a page.  Then everything would go back to working.  You can detect this problem by looking at the iPhone&#8217;s icons if something goes wrong (3G should be displayed).</p>
<p>A second problem was that the MobileTerminal program would sometimes die without warning, taking socks down with it.  Starting terminal and lauching socks solved this problem.</p>
<p>Finally, in the area I tested (on a moving Amtrak train from Sunnyvale to Berkeley), iPhone tethering had very high error rates in places with poor reception.  My browser has Firebug installed, and it showed a high number of javascript errors on repeated page loads from wordpress.com.  This was in contrast to my dedicated card which had no errors.  It&#8217;s not clear to me why corrupted pages somehow got loaded, but this seems to be the case (javascript which had some missing chars here and there).  I&#8217;d think the pages would just take longer to load, with TCP/IP retransmitting whatever garbled packets were received, but this was not what I experienced.  I&#8217;m at a loss to explain this, other than to say the number of errors I had was fairly large, which caused the site to not function properly.  It&#8217;s quite possible that 3proxy has some bugs under error conditions.</p>
<p>Also, the SOCKS proxy setting in the Network Proxies tab no longer works properly.  This is apparently due to changes Apple has recently made.</p>
<p>
<!-- AddThis Button BEGIN --><br />
<a href="http://www.addthis.com/bookmark.php" target="_blank"><img src="http://s9.addthis.com/button1-share.gif" width="125" height="16" border="0" alt="Bookmark and Share" /></a><br />
<!-- AddThis Button END --><br /></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/rogerbush.wordpress.com/9/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/rogerbush.wordpress.com/9/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/rogerbush.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/rogerbush.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/rogerbush.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/rogerbush.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/rogerbush.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/rogerbush.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/rogerbush.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/rogerbush.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/rogerbush.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/rogerbush.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=rogerbush.wordpress.com&blog=2869039&post=9&subd=rogerbush&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://rogerbush.wordpress.com/2008/08/11/how-to-tether-the-iphone-3g-to-a-mac-laptop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e9fee4f625317e26721c36555f2002da?s=96&#38;d=identicon" medium="image">
			<media:title type="html">rogerbush</media:title>
		</media:content>

		<media:content url="http://s9.addthis.com/button1-share.gif" medium="image">
			<media:title type="html">Bookmark and Share</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/img_0009.png?w=200" medium="image">
			<media:title type="html">Unix Command-Line From A Jailbroken iPhone</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/img_00041.png?w=200" medium="image">
			<media:title type="html">Cydia Installer on Jailbroken iPhone</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/img_0005.png?w=200" medium="image">
			<media:title type="html">MobileTerminal Installed.  3proxy is installed but has no icon.</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/network-tether-dialog1.jpg?w=300" medium="image">
			<media:title type="html">Static IP Settings for Our New Network Location (Tether)</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/network-tether-proxy-dialog1.jpg?w=300" medium="image">
			<media:title type="html">We do not set the global SOCKS proxy setting (could not figure out how to make this work).</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/internet-sharing-dialog1.jpg?w=300" medium="image">
			<media:title type="html">Enable Internet Sharing Over Wifi (Ad Hoc Network)</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/img_00071.png?w=200" medium="image">
			<media:title type="html">Select the Mac Laptop\&#39;s Wifi (an Ad Hoc Wifi Network).</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/img_00082.png?w=200" medium="image">
			<media:title type="html">iPhone Wifi Static IP Settings</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/img_0010.png?w=200" medium="image">
			<media:title type="html">Launching Socks Proxy (3proxy) Program From Terminal Command-Line</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/firefox-network-dialog.jpg?w=300" medium="image">
			<media:title type="html">Firefox Advanced/Network Tab</media:title>
		</media:content>

		<media:content url="http://rogerbush.files.wordpress.com/2008/08/firefox-proxy-dialog.jpg?w=300" medium="image">
			<media:title type="html">Firefox Proxy Dialog (for setting SOCKS proxy)</media:title>
		</media:content>

		<media:content url="http://s9.addthis.com/button1-share.gif" medium="image">
			<media:title type="html">Bookmark and Share</media:title>
		</media:content>
	</item>
	</channel>
</rss>