How to install OpenVPN on a VPS
In this guide we will be installing ‘OpenVPN Access Server’ onto a VPS.
1. Get a VPS
You are going to need a VPS with full root access. You can get one here.
In our guide we will be using a 512MB VPS running ‘Ubuntu 14 64bit’ as our operating system. If you choose to use a different operating system, the commands in the “Installation” section will be slightly different.
1. Prepare the server
Connect to your VPS using SSH.
Make sure that TUN/TAP is enabled on your VPS. With some providers, you can enable this feature directly in the Server Control Panel with a single click. Just allow time for the VPS to reboot with the new feature enabled. Then, run the following command:
If you get a result that looks like this:
/dev/net/tun: File descriptor in bad state
You are all set. “File descriptor in bad state” tells you that TUN is enabled. If you get a different result, TUN may not be enabled on your VPS. Try again or contact your provider so they can check.
Now, lets make sure that iptables is running on your server:
It should be running already by default, however if for some reason you get an error or not found result back, you can try installing iptables manually:
apt-get install iptables