Some days, I wonder why VPN’s are really necessary when we can just use an SSH tunnel.
If you’re on Mac or a flavour of Linux, this SSH tunnelling tutorial is for you.
“A secure shell (SSH) tunnel consists of an encrypted tunnel created through a SSHprotocol connection. Users may set up SSH tunnels to transfer unencrypted traffic over a network through an encrypted channel.” – Wikipedia
Launch an SSH tunnel
To initiate your SSH tunnel, simply [open Mac OSX / Linux Terminal] and connect to your remote server via SSH with the following flags:
ssh -D 8080 -C -N email@example.com
This will launch our SSH tunnel on port 8080 and route all traffic (securely) through the server at example.com.
Browse the Web with Your SSH Tunnel (Chrome)
Now, let’s start browsing the web using our new SSH tunnel.
- Open Google Chrome
- Select ‘Chrome’ up the top left
- Select ‘Preferences’
- Select ‘Show advanced settings…’
- Select ‘Change proxy settings…’
- Select ‘SOCKS Proxy’
- Enter ’127.0.0.1′
- Enter port ’8080′
- Save changes by selecting ‘OK’