Tunnel your HTTP traffic with ssh: Difference between revisions
(→Notes) |
No edit summary |
||
Line 17: | Line 17: | ||
ssh -fND 12345 user@superserver | ssh -fND 12345 user@superserver | ||
</source> | </source> | ||
[[Category:Cookbook]] |
Revision as of 17:58, 12 January 2011
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 -fND 12345 user@superserver