Create Multi-Purpose SSH Tunnel
- December 5th, 2009
- Posted in Internet . Linux . OS-X
- Write comment
Recently I was on public WI-FI in The Aviator and I wanted to encrypt my traffic to prevent anyone else from sniffing it.
The simplest way to achieve this was with a multi-protocol SSH tunnel.
The concept is that SSH can be a ‘encrypted wrapper’ around your other TCP traffic, eg HTTP or IMAP. You open a SSH session between your machine and another (outside of the public WI-FI / Firewall etc) and funnel your traffic down and up it, thus the ‘tunnel’.
Not only does it mean that normal traffic is now encrypted but you can also use it to bypass restrictions in the local network.
In a terminal you’ll need to use the following line to open the tunnel and put it in the background:
ssh -fND localhost:2080 user@remotehost
The above will mean that now any program I set to use localhost:2080 as a SOCKS proxy will tunnel the requests to the remote host and back again, keeping the whole thing nicely encrypted.
In Firefox and Thunderbird it’s quite easy to set up, it’s just in the Network section of the program’s preferences:



No comments yet.