CallumA of Digital Ocean, a cloud service provider whom recently added support for FreeBSD, shows us how to set up a private OpenVPN server on FreeBSD 10.1.


OpenVPN is an open-source virtual private network (VPN) server/client application which allows you to join a virtual network (similar to a LAN) securely.

This tutorial will explain how to install and configure an OpenVPN server on a FreeBSD 10.1 machine with IPv4 NAT and routing. It includes short explanations of various configuration options.

By the end of this tutorial you’ll be running your own OpenVPN server, and have a client configuration file ready to download to connect to this network.


  • A FreeBSD 10.1 Droplet. Droplet size depends on how many clients you intend to connect to the VPN; 519 MB is fine for a few clients
  • Root access. sudo is pre-installed on DigitalOcean, so there’s nothing extra to do

This tutorial requires root access. On DigitalOcean, access the server as the default freebsd user, then access the root shell:

sudo tcsh

Step 1 — Installing OpenVPN

Installing OpenVPN with the pkg system is quite simple. Simply run these commands to update the package lists and install the VPN software:

pkg update
pkg install openvpn

This should also install the easy-rsa package, which will be used to generate the SSL key pairs.

Full tutorial: