by Laurent Richard, in December 2006 (article #394). Translated from French to English by Jean-Etienne Poirrier (homepage).
In this short article, also called a tip, I will show you how to use SSH to get around a (too) exacting proxy or firewall. Of course, the SSH port must not be filtered.
You are in a place where Internet streams are filtered or require an authenticated access, free or not.
In short, you don't want or you can't go by the "usual" way.
The SSH port is open and you can connect yourself to a remote server that has a free access to Internet.
I will try to fulfil your curiosity by showing you how to pass a stream through two chosen applications (among a myriad of others) via a SSH tunnel:
Here is the command to type in a your favorite terminal (gnome-terminal, ...):
Then, in your browser, you only have to configure (via the advanced options) the SOCKS5 proxy as localhost:4242.
This works very well for Firefox but you should take care to empty all the other proxy fields (except the one for socks, of course).
Without that, Firefox thinks it deals with a classical http proxy.
For Jabber, we need some additional explanations ;)
Here is the command:
To explain a bit this command, we create a SSH tunnel on the local port (localhost) 1234 to the remote port 4242. Then we create a new SSH tunnel from the remote port 4242 (on isiarlon server thus) to the Jabber server port 5222 (here: Jabber.org).
In summary the remote port 4242 plays as an intermediary between our computer and the Jabber streams reception port. (This technique can be applied to other protocols).
Let's try a bit this new connection (if it doesn't work, we'll look a bit stupid).
This technique also works to test http and other protocols.
The result should look like this:
Next, you only have to configure your instant messaging software with localhost as a server and 1234 as a communication port.
Now, if it works, you'll be glad and connected to the world.
About the author
Laurent is a M.Sc. in commercial and financial sciences. Passionate about free software, he participates in a lot of projects about freedom and consumer protection in relation with new technologies. He also attends courses to become a B.Sc. in computer sciences but he by far prefers theoretical topics to lines of code. This doesn't prevent him from being concerned by his fiancée, hacking, computer security and its implications.