Sunday, 5 January 2014

SSH SOCKS Proxy Tunnel with Putty & Firefox


There are times, for whatever reason, that you need your ip address to appear to be in a different country. For instance, although Netflix and Hulu [now] are available to me here in Canada, they both have some shows only available to u.s. customers. This is how to use a remote server to get a u.s. ip address.

Some minor [and obvious] points of note;
  1. you need to change the configuration of a browser [Firefox], so consequently it will only work with this configuration and putty running. I therefore suggest downloading, installing, and using a different browser for non tunnel browsing 
  2. the remote server must be located in the country where you want to appear to be coming from, in my case, the U.S.
  3. you only need a user ssh account on the server.
Lets begin.

First off, download and install putty [http://www.putty.org/ ]

Run putty.
On the putty configuration page;
enter the remote servers name or IP address, for host name or IP address.


On the left, under categories, expand ssh and click on tunnels. About midway down enter, and make note of,  a high port number as source port and click add. I use  38953 because I know its not used for anything else.




Make sure local and auto are ticked. [as Allonym pointed out in his comment, you should tick dynamic and auto, then it will work]. On the left, click on sessions, give it a name in saved sessions and
click save.

To start using the SSH tunnel, highlight that session, click load then open. You will get a big black box with a login prompt. login with your userid and password. Once logged in minimize putty.

Now, we need to configure a browser, in this case Firefox, to use the ssh tunnel.

Start Firefox. Click on the Firefox tab, then options, | options, | advanced, | network, | settings.



Tick manual configuration, and in SOCKS host put 127.0.0.1 and set the port to the port number you made note of when configuring putty. In my case, 38953. Click ok, ok, and restart Firefox.

It may take a minute, but it will come up. Try going to http://www.hulu.com/. If you get all the graphics and can play the
videos you've done it right! If you get "I'm sorry this content is only
available in the u.s." then something is wrong.

Now to access the U.S. Netflix and Hulu you need to run putty and login [and keep it running] before starting Firefox. Note, Firefox won't work properly without putty running and you being logged in.

**** UPDATE ****
Hulu has implemented some sort of detection system for anonymous proxy access, so this may not work any more. The notice you will get is;

"Based on your IP address, we noticed you are trying to access Hulu through an anonymous proxy tool. Hulu is not currently available outside the U.S., you'll need to disable your anonymizer to access videos on Hulu."

Netflix does still work.

That's it!


My other blogs:
OpenVZ on Debian                -  http://openvzondeb.blogspot.ca/
Linux Server Hardening        -  http://linuxserverhardening.blogspot.ca/
Icecast on Debian                  -  http://icecastondebian.blogspot.ca/2013/10/page-one_31.html
SSHFS with rcync                 -  http://usingsshfs.blogspot.ca/
SOCKS Tunneling                 -  http://sockstunneling.blogspot.ca/ 
Kobo Arc 7", 64GB               -  http://koboarc.blogspot.ca/ [*new*]
and, a few works in progress:
Short Stories                          -  http://louisebridgewrites.blogspot.ca/
Android TV Sticks                -  http://tvsticks.blogspot.ca/


My Streams:
Ices information panel          -  http://www.eclectica.mx:8000/

One of my streams is an all Neil Young stream.To see its listing on the Icecast Directory [at:  http://dir.xiph.org/ ] search for Neil.
The search results will be: Neil Young [x listeners] " All Neil Young, and only Neil Young."

[all links in this article worked as of 2014/03/25 ]