OpenVPN has become the most widespread VPN (Virtual Private Network) protocol used by today’s commercial VPN providers.
However, did you know you can set up your own VPN service on a VPS (Virtual Private Server) which provides a closed environment situated as a physically remote server?
If you lease a VPS from 4GoodHosting you can do anything you want with it, such as installing any operating system, and basically treating the VPS as your own personal remote server.
If you are interested in running a VPN service on your VPS then this article will be helpful.
Using automated installation scripts, the process has become easier for the average person to use. The following is how to install OpenVPN on your own VPS server running Centos 6.x or 7, Debian (or Ubuntu) Linux.
- download an auto-installer for OpenVPN, such as this one openvpn-install
- Next: login to your VPS (as root) and run the following:
- wget http://git.io/vpn --no-check-certificate -O openvpn-install.sh; chmod +x -openvpn-install.sh;
If you are not logged in as root you type: sudo ./openvpn-install.sh
The OpenVPN auto installer will execute and it will then prompt you for more information as follows:
1. The script will first autodetect your public IP address. (if you have multiple IP addresses on your VPS you can set it via the script to utilize a specific one.)
2. Next, type in the port number used for incoming OpenVPN connections (or use the default of “1194”). Any port can be used, any random one will likely do – as long as it is not in-use by other application server, or service. Select whether to listen on port 53 too; which is useful for covert connections.
3. Next, you will be asked for a name of client certificate. You can use anything such as “user1”, “anonymous”, “johndoe”, yourdog’s name, etc.
That’s all the OpenVPN installer needs to know. Subsequently it will download the packages, generate the encryption keys and certificates and then after that it will attempt to start the server. OpenVPN uses 2048bit RSA keys for authentication and the 128 bit Blowfish algorithm for data encryption.
If everything went smoothly, the auto-installer will notify you that the security client certificates have been saved into a .tar.gz archive, e.g. “ovpn-client.tar.gz”.