fakeempire / about

tunnel web traffic over ssh

posted on june 14th in tech

I'm moving over to china for a year or so and needed a way to encrypt all my traffic and keep from getting blocked by the great firewall of china.

I did some searching and asked the guys over @ think tank forums. Someone mentioned just tunneling the traffic over ssh. Easy enough, I just always thought of using a proxy. This works awesome and I have servers sitting in a few random places around the globe so its my current solution.

Start the ssh connection to the server from your client machine. Replace $PORT and $HOST_NAME with a port you want and your server obviously.

ssh -fND localhost:$PORT $HOST_NAME

In Firefox click on the menus Edit > Preferences. Pick the Advanced tab and click on Settings next to Configure how Firefox connects to the internet. Select Manual proxy configuration, enter localhost in the SOCKS Host text field and enter the port you used for your tunnel. Close the dialog to apply the settings.

To prevent Firefox from doing NS lookups enter about:config in the URL text field and double click on the network.proxy.socks_remote_dns to set it to true.

References:

http://wiki.freaks-unidos.net/weblogs/azul/firefox-ssh-tunnel

© 2009 fakeempire