Friday, September 29, 2006

OpenVPN client configuration

Configuring OpenVPN for client use turned out to be rather simple. We installed the OpenVPN GUI found at http://openvpn.se, and then went to the configuration files stored in this location:

c:\program files\openvpn\config

First, we copied the files we generated on the server to this folder. Since I was installing on a laptop, I named my key files "laptop.key" and "laptop.crt". I placed copies of those files in this folder. I also need the "ca.crt" file from the server stored in this location. All three files were copied over using a USB thumb drive, so there is no risk of them getting into the wrong hands.

My configuration file looked like this:

client
remote 205.174.168.29 1194

dev tun
# proto udp
comp-lzo
ca ca.crt
cert laptop.crt
key laptop.key

verb 3


I then double clicked on the OpenVPN icon in the system tray, and lo and behold, I was connected to the local network at work!

After a bit though, it started randomly dropping the connection and then reconnecting. This was annoying, so I did a bit more digging.

By adding these lines to the config, the connection became much more stable:

persist-key
persist-tun