Reverse tether i-Device to PC without cellular

Discussion in 'Jailbreaks and iOS Hacks' started by iphone2g&3gfan, Jul 19, 2016.

  1. iphone2g&3gfan, Jul 19, 2016
    Last edited: Jul 19, 2016

    iphone2g&3gfan macrumors member

    Joined:
    Jun 14, 2013
    Location:
    Orlando, Florida
    #1
    Hello
    I found a way to reverse tether an i-Device to a Windows PC with ssh, without needing the second network interface provided by a cell network (so it could also work on an iPod Touch or iPad) I used an iPhone 4s with fried Wi-Fi and bluetooth.

    It works by port forwarding a port (probably 80) to your pc's localhost at port 80.

    You will need 6 pieces of software:

    1. OpenSSH
    You MUST have OpenSSH installed for this trick to work, as it uses port forwarding by ssh.

    2. A web server
    I have Win 7 that came with IIS7 (Internet Information Services 7) installed so I used it, but I would use nginx or Apache. Should have php or cgi support (proxy uses one of these two)

    3. A proxy script
    I use PHProxy, it comes in a php script, that provides a URL box and doesn't filter anything. Youtube does not work, as m.youtube.com redirects to localhost.com and infinite pinwheels. However you can use a script called Youtube info at a h3xed website, you enter your url and out comes the resolution options, and at the bottom are the complete files (audio and video) choose the one you want. copy, and use VLC or something to stream.
    You must use a proxy as this trick only allows access to one URL. But a proxy used locally just simplifies a URL box to one url, so you can access anything from one webpage, as this trick demonstrates.

    4. An ssh client WITH server to client port forwarding
    I use bitvise SSH client for windows.

    5. Something that can create a usb ssh tunnel
    I use itunnel, back from the olden days of jailbreaking (~2009) but it still works. I can't find this online anymore, so I will link it. If you want to try this on mac, try using ifunbox's usb tunnel feature on port 22 (ssh)

    6. Privoxy or equivalent.
    Somehow it doesnt work now without privoxy. so install it too. Listens by default on 127.0.0.1:8118.

    Let's get started.

    Step 1. Add correct info to ssh client
    open bitvise/whatever software you have. you will see a login tab, in it, fill in the usual: host is localhost or 127.0.0.1 (whichever works) port 22, username root, initial method password, password alpine or your password if you changed it.
    Now go to S2C. Here, add something with listen interface localhost listen port can be your choice (recommend:port 80), destination host 127.0.0.1 and destination port 8118.

    Step 2: setup web server
    Set up the web server of your choice, follow the instructions for that web server. Once done, add whichever proxy you downloaded, and copy it into the web server hosting folder (for IIS7, /inetpub/wwwroot) Make sure you remember what the main page to type is, for PHProxy it's index.php.

    Step 3: let the magic happen
    double click on Make_iTunnel.exe, and leave it running. Now go to your ssh client and login.
    Once it's logged in, you're almost done. type this: ssh -L listen_port:localhost:80 localhost
    the command works by making a local port forward: it forwards the port of your choice to localhost at port 80 which will connect it to privoxy, which connects it to your webserver! You can change the last localhost at the end to whatever you want (this is what will redirect safari to your webserver) but I recommend leaving it as localhost, most every other address will error out. If bitvise gave you a warning of a rejection of server to client, ignore it, it doesn't affect anything. Make sure to click apply at the bottom of S2C. Also, ssh might tell you it couldnt listen to your port, in that case change the listen_port to something different and don't forget to change it in the S2C tab as well.

    Step 4: Safari
    in Safari, type localhost/the cgi or php file. (localhost:listen_port/the cgi or php file if changed)
    It should load youf proxy! type and let it connect to the magical internet.


    If any problems arise please let me know and I will try to fix them.
     

    Attached Files:

  2. eyoungren macrumors P6

    eyoungren

    Joined:
    Aug 31, 2011
    Location:
    Phoenix • 85037
    #2
    TetherMe's latest update lets you tether wireless without cellular.
     
  3. iphone2g&3gfan thread starter macrumors member

    Joined:
    Jun 14, 2013
    Location:
    Orlando, Florida
    #3
    I meant REVERSE tether. Not to use wifi instead of cellular in personal hotspot, but to use an internet connection from a pc to make an iphone with fried wifi and bluetooth access the internet. I actually use tetherme with my new phone sometimes for what you mentioned. But screenshots of what I mean:
    IMG_0152.PNG IMG_0153.PNG IMG_0155.PNG IMG_0154.PNG

    I dunno why you'd use an iPhone tethered via cable to a pc. But I demonstrate it's possible :)
     
  4. eyoungren macrumors P6

    eyoungren

    Joined:
    Aug 31, 2011
    Location:
    Phoenix • 85037
    #4
    Oh I got you! Thanks for the info.
     

Share This Page