Tunnel your HTTP traffic with ssh: Difference between revisions
No edit summary |
(→Notes) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
This will open a normal ssh session to superserver and create a SOCKS proxy on your local machine on port 12345. | 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: | * Go to your browser's networking preferences and select SOCKS as proxy pointing to your localhost on port 12345. For example on firefox: | ||
[[File:Socks.png]] | |||
=== Notes === | === Notes === | ||
Line 14: | Line 15: | ||
* You can just open a tunnel in the background without requesting a shell session: | * You can just open a tunnel in the background without requesting a shell session: | ||
<source lang="bash"> | <source lang="bash"> | ||
ssh - | ssh -fND 12345 user@superserver | ||
</source> | </source> | ||
* While you will be able to hide your real IP from the other servers you are connecting to, your IP and your actions can be easily traced back to your account on the server you're sshing in. | |||
[[Category:Cookbook]] |
Latest revision as of 20:04, 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
- While you will be able to hide your real IP from the other servers you are connecting to, your IP and your actions can be easily traced back to your account on the server you're sshing in.