This is part 4 in a series of posts detailing how I’m securing my Internet communications using open-source software.
Part 1 – Set up of an OpenBSD VPS with full-disk encryption and the minimum OS install necessary to run OpenVPN.
Part 2 – Installation of OpenVPN and configuring the PKI system.
Part 3 – OpenVPN configuration and actually running the OpenVPN daemon.
It should be noted that even these measures are only securing part of my traffic. Everything that exits my VPN endpoint is protected only by whatever protocol-specific security measures are already in place (e.g. HTTPS for web traffic).
On Mac OS X, Tunnelblick can be used to connect to the VPN server. It’s an open-source application that offers simple, OpenVPN-specific configuration and a convenient graphical interface.
To install, simply download and run the installer.
Before configuring the VPN, transfer the CA certificate and the client certificate and key from the VPN server to your client computer:
1 2 3
Note that we could have generated the client certificate and key on the client machine, and gone through the certificate signing process without ever transmitting the client’s private key over the network.
Open the Tunnelblick application. On the Configurations tab, click on the + icon in the lower left to add a new configuration. When prompted, select “I DO NOT have configuration files”.
Next, select “Create sample configuration and edit it”.
This process will create a sample configuration and put it on the Desktop.
Move the downloaded certificates and key into the configuration folder:
1 2 3
Edit the config.ovpn file. It may already be open in your default text editor. The only changes necessary are:
- Use port 80 instead of 1194
- Replace the dummy server name and PKI file names with valid ones.
Here’s a diff of those changes:
1 2 3 4 5 6 7 8 9 10
The Tunnelblick configuration folder can be renamed (in this case, to “Example VPN”). To use this configuration in Tunnelblick, add the .tblk extension to the folder name, and then double-click the folder to install the configuration in Tunnelblick.
Click on the “Railroad Tunnel” icon in the Mac OS X menu bar, and select the “Connect Example VPN” option.
That’s it – you’re now using Tunnelblick to route your Internet communications through OpenVPN running on a VPS-hosted OpenBSD server.