Oct
10
2011
0

Everyday I’m Tunneling

I recently moved to Southeast Asia and, as expected, a whole bunch of sites don’t work for me here (Hulu, Netflix, etc). The country I’m living in also blocks a lot of other *viewing material* that is easily accessible in the US, if you know what I mean… and I think you do, you slob :-)

No need to worry, if you have access to a server in the US (I use linode.com), you can most likely tunnel your traffic through it via ssh. Here’s how I did it:

First off, make sure that your server’s /etc/ssh/sshd_config file contains the line:

AllowTcpForwarding yes

You may not need this line, but if it’s set to “no”, you’ll have issues.

Then, type the following into your OS X/Linux terminal (this can also be accomplished easily using PuTTY on Windows):

ssh -D 9999 yourusername@yourserver.com

9999 is an arbitrary portname. Feel free to adjust to your liking. You can also append the “-C” flag to enable compression, although I haven’t really messed around with this. Enter your password and you’re almost there!

Next, pop into your favorite browser (I’m using Chrome on OS X at the moment). In Chrome select:

Chrome>Preferences>Under The Hood>Change Proxy Settings

This will bring up your system network preferences. Check the box next to “SOCKS Proxy” and enter:

127.0.0.1 for the address and 9999 for the port (or localhost/whatever port you entered earlier)

Click OK and then Apply… Boom! You should be good to go. Traffic will be routed through your remote server and you should be able to view sites as if you were in the US!

Note: This will forward traffic for all browsers through your server. Browsers like Firefox allow you to set up a proxy for just that browser. I’m sure you can do that in Chrome/Safari, but I don’t really care to figure out how. Google it, I’m sure it’s easy :-) Just make sure to disable this when you’re done. Oh yeah, if you’re in Firefox, ONLY enter this info into the “SOCKS host” field. Leave all of the other fields blank.

Written by choochburger in: Linux |

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes

Switch to our mobile site