Are you one of those people who worries about someone sniffing your wireless traffic at a coffee shop? Well fear not, because today I'm going to show you how to set up a quick and dirty VPN to secure your packets (and get around those pesky web filters too).
Here's what you'll need:
- A dynamic DNS account set up and pointed to your home broadband connection
- A computer at home running an OpenSSH server with the SSH port forwarded to said computer
- A laptop with the OpenSSH client installed and running Gnome desktop (any recent distro will do)
The dynamic DNS setup is outside the scope of this tutorial, but episode 90 of Systm on Revision3 will show you how to configure it if you don't already know.
In this example, we'll be using Ubuntu Linux, but all the commands (with the exception of the command to install OpenSSH server) will work on all recent distros.
First you need to install OpenSSH server on your home computer. Make sure you have strong passwords set for all user accounts on this machine.
sudo apt-get install ssh
Next, set up port forwarding on your router to pass all traffic on port 22 to the computer on which you just installed OpenSSH server. That's it for your home computer.
Using your laptop, connect to an untrusted or filtered internet connection in your favorite bar or coffee shop. Now you can quickly and easily establish a secure connection back to your home ISP using the following steps:
Open a terminal window and enter in the following command:
ssh -D 9999 user@your.dyndnsaddress.com
Where user is the user name to log in to your home computer. This sets up an SSH socks proxy connection to your home computer on port 9999 of your local machine.
Finally, Click System -> Preferences -> Network Proxy and enter the following settings:
Once this is set all applications that use Gnome Proxy Settings will automatically use the proxy connection. Your packets are now safely encrypted all the way to your home internet connection.
Enjoy!