In this guide we will cover how to install OpenVPN on a NAT based VPS.
Now we have a new NAT VPS, details listed below:
OS: CentOS 6 x64 Minimal
Main IP: 192.168.43.243
Shared IP: (see above)
IP Addresses Assigned: 2a06:8ec0:0000:068e:0000:0000:0000:0001
Connect to your VM and Update
Now from this we can check the external IPv4 to connect and open a SSH window.
Once SSH is open update the OS - "yum update"
To enable TUN/TAP login to the VPS management panel with your user details and then open the instance you wish to edit.
Once the main VPS page has loaded click "VPS Configuration" and then enable TUN/TAP and click submit, once the changes have been successfully applied you can close the prompt window.
Now TUN/TAP has been configured we restart the VM from the panel to ensure changes take effect.
Press Stop/Start in the current control panel view.
You can find nyr's OpenVPN installer which is a open source and community reputable script - https://github.com/Nyr/openvpn-install / https://git.io/vpn1604
In our case we want openVPN to listen on 24319 as this is one of our assigned ports (24300-24320) so we use the following setup:
We then enter our external/shared IPv4.
Now the server is configured we can access it.
Then use sFTP/SSH/rsync to download the config file.
Once you have downloaded the config file load it into the OpenVPN client then... Connect!
Secure Your Server
We would advise all system administrators to secure your new server once configured.
Additional Notes:Ubuntu 16:
Rooban encountered issues on a Ubuntu 16 based setup with the service not starting, to fix comment LimitNProc.
Additional details at: http://askubuntu.com/questions/747023/systemd-fails-to-start-openvpn-in-lxd-managed-16-04-container