If you want to increase the security of your Virtual Private Server we will show you how to install and configure a VPN with OpenVPN on a VPS server. VPN technology has several applications in the digital area, but in this case its use stands out for security in case of having a Virtual Private Server to host a website or to store information about a company or business.
Among the advantages offered by this technology is avoiding geolocation and creating a secure path for information in both directions.
If you use the virtual server as storage space for a company, you can establish a network so that remote workers can send or receive information from this server without privacy risks. In this sense, OpenVPN free software offers an excellent tool that is also very easy to implement even if the user is not so experienced.
What is OpenVPN?
OpenVPN is a free software-based tool that facilitates connectivity between a client and a virtual private server. For data authentication and encryption, OpenVPN uses the SSL library whose function is to provide secure Internet connections for said data.
In the case of online data transmission, you can use the transport layer protocols UDP or TCP . The Transmission Control Protocol (TCP) offers error correction functions which makes it more stable, while the User Datagram Protocol (UDP) is less stable, but offers faster transmission speed.
In the OpenVPN platform you will find information and assistance for the installation and subsequent use of the security protocol, so, even if you are a little experienced user, you can easily use it.
It is currently available for download and installation on all available operating systems, it even begins to form part of the applications by default on various devices. Nowadays it is super easy to connect to an OpenVPN server from your Android device.
Install and configure a VPN with OpenVPN on a VPS server
If you haven’t installed the OpenVPN script yet, you can download it from their website or from a VPN provider of your choice, such as GitHub. Make sure your server is fully updated by running the command #apt update && apt upgrade. If you entered your server via SSH the commands will be #sudo apt-get update, #sudo apt-get upgrade.
Next, you can proceed to the script installation, as in this example that we leave you here : Next we put wget -O openvpn-install.sh && bash openvpn-install.sh.
When the process begins, you must the Public IP of your server and the protocol you want. If what you want is speed, the most recommended is UDP.
You must also select the port where you want OpenVPN, you will see that one is already selected by default, but you can modify it according to your preference as 443 that does not use HTTPS.
Next, you must establish the DNS that you want to use with the VPN, select Google, which is the most used search engine, to make the conversion from domain to IP.
Now what remains is to put a name for the certificate for the client, which can be whatever you want, and wait for the process to finish with the message that it has finished successfully.
The next thing is to change the place file to put it in the home of your VPS and later download the file to your computer, this process will depend on the operating system you use.
For example, for Tunnelblick you can download with SCP using the following command as an example: scp <user> @ <server>: (certificate name) .ovpn.
Now you must take the file to the Tunnelblick or the operating system you use, load it and do a connection test to verify that it works correctly.
Once the upload of the certificate is finished, test that the connection is established normally and you will be able to use the VPN on your VPS server.