Setup proxy via SSH

There is a quick and easy way to set up a proxy connection with SSH. This can be handy when the connection you’re is unsafe or you do not trust it. I normaly use ssh to tunnel single ports. But thanks to an footnote at Linux Mag dec2008 there is a better solution.

You’ll need

  • SSH based machine (proxy). Server
  • Putty (Windows), or SSH (*nix). Client

Connect to the server command: ssh -NCD <port> <server-address>

Browser settings

  • Enable your browsers proxy to SOCKS localhost <port>

And you’re done.

I’ve made a network profile for my Mac, when i select it all proxy settings for Mail, and Safari are set automatically.

One Response to “Setup proxy via SSH”

  1. Koen Says:

    Dont forget to enable this option on your server and you can use the -f option for ssh to make it a background process.

Leave a Reply