Tether your iPhone via USB on Mac OS X Systems

Discussion in 'iPhone Tips, Help and Troubleshooting' started by abmotta, Jan 7, 2009.

  1. abmotta macrumors newbie

    Joined:
    Jan 7, 2009
    #1
    Sorry my poor english... I’m from Brazil. After buying PDAnet and iPhoneModem (and be disappointed with them) I discovered this way of tether my iPhone without use of a Wi-Fi Ad-hoc network. In my opinion this is a better solution because does not drain battery like the previous and does not warm iPhone too much.

    Steps:

    1. iTunes installed on laptop;

    2. Plug your iPhone via USB cable;

    3. Jailbreak iPhone (you can find a guide here: http://www.iphonemodem.com/jailbreakGuide.pdf;

    4. On iPhone, through Cydia, install the OpenSSH package;

    5. On iPhone, through Cydia, install the Bossprefs package (necessary to turn the OpenSSH server on);

    6. Download the iPhone Tunnel application for Mac OS X from here and put it in your application directory;

    7. Go to http://www.proxifier.com/mac/, download the application Proxifier for Mac and install it;

    8. On the iPhone “click” the BossPrefs’ icon > “Config” > Turn on “Show SSH” > “Back”> Turn on “SSH”;

    9. On Mac run the iPhone Tunnel application. It will show a little shortcut on the superior bar (besides the clock, etc.). Click it and in preferences check if “Local port” is set to 9876 and “Thethering port” is set to 9999. Click the iPhone Tunnel’s icon again an then “Turn Tunnel On”. Click it one more time and go to “Tools” > “Thethering”. It will open a Terminal window. Do not close it. It will ask you a password. If you don’t know what this is about type “alpine” and hit Enter. Do not close the terminal window. (ps: if you have changed de password for the user mobile in the iPhone system put it in when asked);

    10. On Mac open the application Proxifier for Mac. On the menu bar go to “Options” > “Proxy settings...” It will open a window. In this window click “Add”. It will open another window with server settings. Configure this way: Address: “127.0.0.1” Port: “9999”, check the “SOCKS Version 5” and hit OK button below.

    11. Again in Proxifier click “Options” > “Name resolution...” > check “Enable” and hit OK button. Leave Proxifier open;
    Change the proxy configuration of your applications (Safari, Adium, Transmission... etc.) Put the same address as Proxifier. SOCKS 5 for type of proxy protocol, 127.0.0.1 for address and 9999 for port. Use the application and see if it works.


    Enjoy.
     
  2. ZOMGVTEK macrumors newbie

    Joined:
    Jan 9, 2009
    #2
    THANKS!

    Works great, and for those wondering its not bad speeds at all!

    [​IMG]
     
  3. pdawg95 macrumors newbie

    Joined:
    Oct 29, 2008
    #3
    Hi abmotta!

    I have tried everything you have outlined and things move along but when I get to step #9, I get an error message when I click on the "Therething" choice. In the Terminal (or bash) window, it tries to execute the command:

    ssh -ND 9999 -p 9876 mobile@127.0.0.1

    and it returns the error message

    ssh: connect to host 127.0.0.1 port 9876: Connection refused

    I'm not very good at this but it seems like it is unable to connect with the iPhone with this command. It doesn't even get to the point where it is asking for my password. Perhaps if it successfully connected with this command, the tether would work. Please advise me!

    Thanks!!
     
  4. abmotta thread starter macrumors newbie

    Joined:
    Jan 7, 2009
    #4
    Give a look in your Security settings and turn of firewall if it is enabled.
     
  5. pdawg95 macrumors newbie

    Joined:
    Oct 29, 2008
    #5
    I'll take a look at this but I'm not sure if/how it would be related to accessing the iPhone. I am connecting the iPhone with USB. That ssh command is trying to access the iPhone, is it not? I thought firewall stuff is for connections from outside looking into a network and preventing that. Ok, I'll still look into it but if you have any other ideas, please let me know! I'll let you know how it goes.
     
  6. 2A Batterie macrumors 6502a

    2A Batterie

    Joined:
    Jun 9, 2004
    Location:
    Out of a Suitcase, USA
    #6
    I was thinking about going through with this, but I just have a funny feeling. Can anyone vouch for this method? A newbie posted this thread and only newbies have commented so I was just wondering.
     
  7. DPA macrumors 65816

    DPA

    #7
    Here are some other instructions too.

    PLEASE NOTE: While tethering is legal, it violates AT&T's Terms of Service and may result in fines and account suspension.

    David
     
  8. m3coolpix macrumors 6502a

    m3coolpix

    Joined:
    Dec 24, 2007
    #8
    Well....I'm a newbie here too via post count (but have had 11 Macs, 4 iPods, over the past decade + now have a couple of iPhones....but I'm still only qualified as being a newbie - just putting it in perspective :D)....

    Anyways, I just followed the instructions in the OP's original post. Mail and Safari worked fine on my MBP. My Mail accounts use both IMAP and POP3 (for different email addresses).

    Obviously you have no idea what the software and proxy may be 'sniffing', but there were no new alerts coming from Little Snitch.

    FWIW.
     
  9. 2A Batterie macrumors 6502a

    2A Batterie

    Joined:
    Jun 9, 2004
    Location:
    Out of a Suitcase, USA
    #9
    My concern about newbies wasn't regarding skill/knowledge, it was more about potential tr0lls or some sort of scam. How many times have we seen that?
     
  10. fetavora macrumors newbie

    Joined:
    Jan 31, 2009
    #10
    Actualization Problem

    Since the latest Mac actualization, the iphone tunnel and proxifier cant check emails trough the entourage or mail.

    Anyone have the same problem?
     
  11. ppc750fx macrumors 65816

    Joined:
    Aug 20, 2008
    #11
    Unless I'm missing something, this isn't tethering your iPhone via USB as much as it is simply plugging it in while doing plain old SSH tunneling.
     
  12. DPA macrumors 65816

    DPA

    #12
    Technically not but it follows the same basic concept: use 3G/Edge on your computer from your iPhone.

    David
     
  13. ppc750fx macrumors 65816

    Joined:
    Aug 20, 2008
    #13
    Well... yeah, but the title of the thread suggested that it was tethering over USB -- something that as of yet isn't common for Mac OS X users.

    We've known it was possible to do SSH tunneling for about two years now (ever since OpenSSH was ported to the iPhone OS.) This isn't really anything new; the only new information in this thread is "plug in your iPhone first."
     
  14. QuarterSwede macrumors G3

    QuarterSwede

    Joined:
    Oct 1, 2005
    Location:
    Colorado Springs, CO
    #14
    If they both do the same thing what's the technical difference? I've searched but found nothing on SSH tunneling vs. Tethering.
     
  15. ppc750fx macrumors 65816

    Joined:
    Aug 20, 2008
    #15
    Tethering makes your iPhone function in a manner not unlike a NIC -- you can use it as your only network interface and send all traffic over it.

    Using OpenSSH as a proxy (which is what the the -D switch does) requires your applications to support SOCKS proxies. DNS lookups will still be done using the local resolver, and some of your traffic won't pass through the phone's connection. In addition, it will require a network connection between your phone and the computer over something like WiFi.

    (Now since the iPhone doesn't support real tethering like other phones, the distinction between the two is somewhat blurred. PDANet, which provides the best solution for "tethering" doesn't really make your iPhone into a network interface for your Mac -- instead, it uses DHCP and clever routing to allow your Mac to use the phone as a gateway.)
     
  16. QuarterSwede macrumors G3

    QuarterSwede

    Joined:
    Oct 1, 2005
    Location:
    Colorado Springs, CO
    #16
    Thanks for the great explanation!
     
  17. DPA macrumors 65816

    DPA

    #17
    Yes, thank you!

    David
     
  18. ppc750fx macrumors 65816

    Joined:
    Aug 20, 2008
    #18
    In the interest of accuracy, I'd like to amend what I said re: DNS & SOCKS.

    DNS lookups *may* be done using the local resolver. Some apps can push DNS through a SOCKS proxy, but most apps tend to be "dumb" in that regard, and just use the locally-defined resolvers.
     
  19. E3BK macrumors 68020

    E3BK

    Joined:
    Mar 15, 2008
    Location:
    NYC
    #19
    Can you use the iPhone WiFi with this setup?

    Hello all. I'm just wondering if this process will allow the of the iPhone WiFi instead of the 3G network.

    Since the iPhone can get free AT&T WiFi at starbucks, airport, etc., but my MPB can't, I'd like to be able to access it through the iPhone. I read the previous posts but am a little lost on if will do this.

    Thanks!!
     
  20. djrobx macrumors member

    Joined:
    Dec 17, 2007
    #20
    Yes, that should work.

    One thing not mentioned in the original instructions: You can skip proxifier and just use FireFox in SOCKS mode. If you browse to about:config you can change "network.proxy.socks_remote_dns" to true. Then you can set the SOCKS proxy under Options->Advanced->Connection Settings and browse without proxifier.
     
  21. Tex-Twil macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #21
    Hi,
    I've just tried iPhone Tunnel with the 3GS but it doesn't seem to work.

    When I run iPhone Tunnel in debug mode, everything looks fine. The device is found and then it's waiting for connections on the specified port.

    When I ssh to the local host nothing happens:

    Code:
    ssh root@127.0.0.1 -p 9876
    The same for the SOCKS proxy:

    Code:
    ssh -D 9999 root@127.0.0.1 -p 9876
    It does not even ask for password.

    Is it working for you ?
     
  22. mankar4 macrumors 6502a

    mankar4

    Joined:
    Aug 23, 2007
    Location:
    USA

Share This Page