Tunnel your HTTP traffic with ssh

From XPUB & Lens-Based wiki
Revision as of 18:50, 12 January 2011 by Aymeric Mansoux (talk | contribs) (Created page with "Here is the situation, you want to hide your IP behind a proxy, you need to access a resource that is blocking your IP but not the one of your proxy, etc. You can do all that if...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Here is the situation, you want to hide your IP behind a proxy, you need to access a resource that is blocking your IP but not the one of your proxy, etc.

You can do all that if you have an ssh account on another machine, using your ssh connection as an HTTP proxy (SOCKS type) is very easy.

  • Open a connection to the server/machine you want to tunnel your traffic through:
ssh -D 12345 user@superserver
 This will open a normal ssh session to superserver and create a SOCKS proxy on your local machine on port 12345.
  • Go to your browser's networking preferences and select SOCKS as proxy pointing to your localhost on port 12345. For example on firefox:

Notes

  • You can just open a tunnel in the background without requesting a shell session:
ssh -D 12345 user@superserver