Skip to content
Step by Step Internet 🌐 Guides for learning to surf the Net

How to install and configure a VPN on a VPS server with OpenVPN? Step by step guide

How to install and configure a VPN on a VPS server with OpenVPN? Step by step guide

When we use a virtual private server or VPS we are generating the link between two points, which we will call tunnel and we can send a flow of data packets in a secure way without being intercepted by intruders .

The VPS can be used in any type of platform being a solution for the different hardware and software that exist in the configuration of the network to which they belong.

As a requirement, the implementation of this technology, we have to take into account that we need a static IP provided by our Internet provider, as well as having the operating system updated. In this article we will show you all the benefits and steps needed for the implementation of a VPS on Windows or Linux.

What are the benefits of setting up a VPN tunnel on a server VPS?

Cuáles son los beneficios de configurar un túnel VPN en un servidor VPS

The first thing we will have to say is that VPN is a virtual private network. To connect to a website, we first have to issue our requirement to the router and it sends it to the Internet provider, which contacts our VPN and we just access the server on the page.

In this way, what we are doing is increasing our security level and avoiding the geolocation of our computer.

We can also talk that there are VPNs that are free and others for which we will have to pay for them , but neither of the two alternatives are safe enough. This is because servers, especially free ones, can offer our data to third parties in certain situations.

This is why if we have confidence in a domestic Internet connection, we can create our own VPN, which we will call VPS (Virtual Private Server) . We can configure this tool like any virtual private network and we will protect our Internet traffic in a safer way.

To do this, we will use a tool called OpenVPN , which will help us to encrypt the data from end to end.

The advantages of using a VPS network are the following:

  • We can access anywhere in the world via the Internet , no matter how much local restrictions exist, since we will enter from where the servers are hosted.
  • We managed to have remote access to another device that uses the same VPS, and it is very difficult for unauthorized users. This way we can also share resources, for example, a printer.
  • Our Internet traffic is secure because it is encrypted from point to point.
  • We do not depend on the software of a VPN, which often have to share our data in a mandatory way.
  • It has a relatively low cost with respect to Virtual private network memberships.
  • It is much safer than using a virtual private network.
  • We can connect to any network regardless of its security level.
  • We will always navigate in a hidden way.

Why choose OpenVPN to protect the IP of your virtual server private?

Por qué elegir OpenVPN para proteger la IP de tu servidor virtual privado

OpenVPN is a software that allows us to realize a P2P type connectivity, between different devices that can be in different places of the world. One of its main features is that no static IPs are needed on both sides of the tunnel.

This technology was developed in 2001 by James Yonan, which was improved thanks to the different user contributions. It is considered one of the most practical and easy-to-use tools for users with little network experience.

It can be implemented in the business environment , where it is used for the connection between different points of the same company through the Internet. It is also used when two companies need to share their information privately, without having to upload that data to a public or easily accessible site for intruders.

Thanks to this tool users who have remote access are protected because they need to enter passwords or passwords on their different devices, even if they are not directly connected to the network.

In addition, can be used with any firewall and only one port is needed for OpenVPN to work, since the software is the one with the multi-ports.

OpenVPN can also function as a server waiting for incoming connections or also initiating connections to it, thus allowing it to run as a TCP service.

If we have to talk about some limitations of this technology, we have to refer to its little knowledge among people who manage networks , we can also mention that is not compatible so that its protocols that secure IP addresses with encryption in a data flow packet , that is, IPsec.

Steps to configure OpenVPN on an easy Windows or Linux VPS fast

Pasos para configurar OpenVPN en un VPS en Windows o Linux fácil y rápido

We detail below how we have to configure OpenVPN on a virtual private server.

In Windows

To configure on a Windows OpenVPN operating system we will follow this guide:

  • We obtain the necessary keys so that we can connect to the openvpn server using the <. build-key uservpn> command, which we will write in a DOS window.
  • We copy these keys to a USB stick, or write . With this command we will get all copies of the contents of accoun/etc/openvpn/keys†.
  • We create a file in the location “/ etc / openvpn” , with the name “client.conf” on the server.
  • Again we copy this file to our USB drive with the command
  • Download OpenVPN.
  • Open the location of the executable file.
  • Choose the option “Run as administrator” .
  • In the message that will appear we choose the option permittedSí•.
  • Next, we click on clearlyNext†.
  • We choose all the components we want to install.
  • Select “Next” .
  • We look for the installation path for the program which is usually “C: / Program Files / OpenVPN” .
  • We click on “N ext ”.
  • Next, press clearlyFinish•.
  • Open our USB stick and verify its contents by searching for the file “Client.conf” .
  • We change the extension of that folder to assertclient.ovpn†.
  • Copy the memory keys to the location “C: / Program Files / OpenVPN / config” , choosing only: crt ; whezzyVPN.crt ; uservpn.key ; uservpn.crt ; ta.key and client.ovpn.
  • Open our browser and access http: // www.vermiip.es/ .

This shows that our public IP is not the same as always .

To connect to the server we have to create a shortcut icon and right click on it we choose the option “Run as administrator” .

On Linux

When we have a Linux operating system, we will have to install a script. To do this we must perform the following step by step:

  • We go to our control panel and in the “Settings” tab we activate “TUN / TAP” and “ppp” strong >.
  • We update the server by typing and .
  • Install OpenVPN with the .
  • At this moment all the programs that are necessary to operate will be installed, we copy the file to our PC, for which we will perform the following command .

In order to have an OpenVPN tunnel in a graphic way:

  • We will use the following command .
  • Select “Network” .
  • We look for the “VPN connections” option.
  • We click on “Configure VPN” .
  • We choose the option if we want a wireless or wired Internet connection.
  • We click on allowsAdd†.
  • Open the “file .ovpn ”.
  • We click on eachCrear•.
  • We choose the ” VPN “ tab.
  • We write in “General” the IP address.
  • Next, we select the “User certificate” “Client-ubuntu.crt” .
  • We write in “CA Certificate” “ca.crt” .
  • In “Private key” we will add “client-ubuntu.key” .
  • And we choose a password for the private key.
  • We click on permittedSave.
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept