The free and seemingly well regarded option for vpn was openVPN.
I had installed xubuntu on my desktop/server box. You need to have openssh and openssl installed before attempting to install openVPN.
installing openVPN on ubuntu was fairly easy
sudo apt-get install openvpnI installed the stable version openVPN 2. The main configuration files are located in
/usr/share/doc/openvpnThe "easy-rsa" folder was under the "examples" folder here. I followed the instructions as specified in the "openVPN Howto".
There are 2 types of VPNs you can setup :- Ethernet Bridge and Router based. Ethernet bridge is used when you want the client machine to be a part of the private subnet and allows for multi-casting (which is required by most LAN games). At the same time, routing is recommended for other purposes, so went with the router-based option.
Copy over the "easy-rsa" folder over to
/etc/openvpn/Edit the "vars" file in the easy-rsa folder.
Make the following changes :-
export D=/etc/openvpn/easy-rsa/2.0
export KEY_COUNTRY=US
export KEY_PROVINCE=CA
export KEY_CITY=SanFrancisco
export KEY_ORG="My-OpenVPN"
export KEY_EMAIL="mine@example.com
Now run
. ./vars or source ./varsthen
./clean-allThe next command creates your certificate authority (CA) using the parameters you just set, you should just add Common Name, I used OpenVPN-CA. For this step you'll need OpenSSL.
Now we need to create the certificate :-
./build-caNow let's create the keys, first the server:
./build-key-server serverThis is important. When build-key-server asks for Common Name write server, the same parameter you provided to the command. Also you'll need to answer yes to these two questions: Sign the certificate? [y/n] and 1 out of 1 certificate requests certified, commit? [y/n].
Now the key for the client:
./build-key client1Use client1 as Common Name, the same parameter you used above for build-key.
Now let's create Diffie Hellman parameters:
./build-dhThere you are! Now you should have a new directory with your certificates and keys: /etc/openvpn/easy-rsa/keys. To configure your first client copy these files from server to client:
ca.crt (required for all clients)
client1.crt (specific to each client)
client1.key (specific to each client)
Now that the keys are set, modify the server openvpn config file as specified in the openVPN Howto.
For the client, i had used a windows Vista machine. Download the windows installer exe from the openVPN.net site and install everything.
Create a "keys" folder under "C:\Program Files\OpenVPN\easy-rsa". Copy over the client specific files over from the server where you had generated them (FYI: this is has to be done securely!).
Copy the client.ovpn file from C:\Program Files\OpenVPN\sample-config into the "keys" folder.
Modify the "client.ovpn" file to be consistent with the server. Modify the following directives:-
"dev-node" (name of the TAP Win32 Adapter)
"remote"
"ca"
"crt"
"key"
"ns-cert-type server" ( i enabled this, since it helps prevent certain kinds of attacks)
"tls-auth" (if you had created this key on the server earlier, read "Hardening OpenVPN Security" in the openVPN Howto section).
Now, you are ready to run the VPNs :-)
Start by running the server. it can be invoked as :-
openvpn server.conf ( i did this on the linux box )
it should throw up a bunch of messages ending in "Initialization Sequence Completed".
Run the client also from the command prompt ( i didnt install the GUI ) in a similar fashion:-
openvpn client.ovpn
