HTTP access through socks-ssh-tunnel

11 May 2017

To browse the internet via an AWS server, or any other remote server running ssh and that has internet access, run the following command on a Linux box:

ssh -D 8123 -f -C -q -N user@ssh-server-ip

Of course, the target server has to be able to access the internet. The command arguments used above are:

Then set the browser of choice to use socks proxy localhost 8123 and go browse. You can test it is working by doing a google search for ‘what’s my ip’ and if all is well it’ll return the gateway IP of the ssh server, not your own gateway.

This also works well if you use a server in another country (aws / digital ocean etc) to get round some geo-ip content restrictions. Be mindful to consider if you are charged bandwidth by that remote server service, and the effect of using it for general browsing / streaming.