Use ssh as a proxy server

Using ssh as a proxy or encrypted tunnel to browse the web can sometimes be necessary:

  1. When you’re at a conference but need to login securely to your blog.
  2. When local access restrictions make life really difficult.
  3. If you have a server in another country and want to see what Google Adsense adverts people see in that country.

ssh -D 8181 -Nf  example.com

ssh -D 8181 -Nf  yourlogin@example.com

Where example.com is the name of the site you are connecting to (ssh) and 8181 is the port you’ll use in your browser.

You’ll use the first option if you have set up your connection without password, otherwise use the second option

Then configure your browser to user Proxy at: localhost:8181 (or 127.0.0.0:8181)

Here’s an example of how to configure the proxy on Mac

Mac's Proxy setup

Enjoy.

Leave a Reply

Your email address will not be published. Required fields are marked *