SSH connection as socks proxy

sometimes it is very useful to have http access into a remote network but you can only reach one single linux machine inside this network. there is a simple way to tunnel http requests from firefox through your ssh connection:

connect with the -D option to set up the proxy service

ssh -D 1080 user@some.server.somewhere

this will now run a local socks proxy on localhost:1080

in order to get firefox to use this tunnel, you need to configure a socks proxy in firefox. since you might want to switch this proxy on and off several times it is a good idea to use an add-on to do this, so it can be done with a single button:

  1. install the MM3 ProxySwitcher Addon
  2. restart firefox
  3. right click on the toolbar and choose customize…
  4. add the mm3 button to your toolbar
  5. click on the little down pointing arrow next to your mm3 button and choose Edit
  6. replace the settings with these:
    [Socks Proxy
  7. now switch the proxy ond and off by clicking on the mm3 button. it's on when it's red and off when grayed out.
  • ssh_connection_as_socks_proxy.txt
  • Last modified: 16.07.2013 07:06
  • by Pascal Suter