Using ssh as a proxy or encrypted tunnel to browse the web can sometimes be necessary:
- When you’re at a conference but need to login securely to your blog.
- When local access restrictions make life really difficult.
- If you have a server in another country and want to see what Google Adsense adverts people see in that country.
I use ssh for the third reason. I want to see what adverts people in the USA see when they look at my blog so I can filter out the low paying and MFA ads (see notspam.org for more). Unfortunately I have a head like a sieve so unless it’s in the bash history I need to go look this up every few months:
ssh -D 8080 -Nf example.com
Replace example.com with your own hostname. That short command will create a socks5 proxy at 127.0.0.1:8080. Just configure your browser to talk to that and you’re surfing again!
Here’s a few external links you might find useful.
- Matt had trouble with his socks5 dns while travelling.
- Proxy Firefox through a SSH tunnel
- I need to install Foxy Proxy to make this easier to manage.
– if only I had searched for the right terms I would have found this excellent page sooner.
(I bet that when I most need to look up this post I’ll be behind a tight firewall that won’t let me at my blog ..)