Tag Archives: Firewall

Cool SSH trick – use SSH binding to set a proxy on localhost

Setting up a proxy using SSH bindings

Sometimes you find yourself unable to do certain things from work because they require you to access a service via web browser on a port that’s being blocked in the company firewall. A cool SSH trick allows you to bypass this problem and to be less exposed to the company’s tracking system.

If you have SSH access to a remote server, you can use it as a proxy, and there’s nothing easier than using SSH bindings, so here’s a quick and easy tutorial on how to do it on your Linux machine.

Things you need:

  1. SSH access to a remote machine
  2. Firefox
  3. FoxyProxy Firefox plugin

This is probably one of the coolest things you can do with SSH, the magical flag “-D”. The “-D” flag enables you to create a SOCKS v5 proxy on your local machine and tunnel your entire web traffic through it and avoid the firewall.

Open a terminal and write the following:

ssh -D 9999 remote_user@remote_server.com

After you log in, you need to stay logged in, so just keep the terminal open.
Continue reading