OMV (openmediavault) is an open source NAS operating system based on Debian. If you're not familiar with it, head here and check it out.
This tutorial assumes basic knowledge of Linux and root access to your OMV server. Lets get started.
Installing OpenVPN (as root)
apt-get install openvpn
After installing OpenVPN, you'll want to obtain the VPN certificate files. These should be provided to you by your VPN provider. My personal recommendation is PIA. If you choose to utilize PIA, you can download the necessary files here.
At this point you'll want to transfer the certificate files over to your server either using SCP or some other mechanism. I personally recommend directly downloading it on the server with wget and then unzipping it with unzip.
From your extracted files, move ca.crt, crl.pem, vpn.ovpn to /etc/openvpn/ (Note: vpn.ovpn refers to whatever VPN server you're looking to connect to)
edit the vpn.ovpn file using whatever editor you prefer and replace the line
Save and close the file.
Next, create login.txt in /etc/openvpn and place your username on the first line, and your password on the second line. These should be provided to you by your VPN provider.
Now change the extension of vpn.ovpn file to vpn.conf
mv vpn.ovpn vpn.conf
To ensure that OpenVPN connects to this VPN on start, we must edit the openvpn configuration file. Open /etc/default/openvpn in your editor of choice and add the entry
AUTOSTART=vpnwhere vpn refers to the vpn.conf file in /etc/openvpn/. Adding this entry will allow openvpn to search for this configuration file on start and run it.
Lets test our handywork. Start and run openvpn
Now test the connection using
You should see a different WAN IP which represents your VPN IP.
curl -s http://ifconfig.me
Now restart openvpn and be set