Configure VPN on a VPS  Step by Step Guide ▷ 2020

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

The VPS can be used on 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 that are needed for the implementation from a VPS on Windows or Linux.

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

What are the benefits of configuring a VPN tunnel on a VPS server

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 request to the router and this sends it to the Internet provider, which contacts our VPN and we just accessed the page’s server.

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 connection to the Internet, 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 more secure way.

For it, 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, even if there are local restrictions, since we will enter from where the servers are hosted.
  • We managed to have remote access to another computer Using the same VPS is also very difficult for unauthorized users. In this way we can also share resources, for example, a printer.
  • Our Internet traffic is safe because it is end-to-end encrypted.
  • We do not depend on software of a VPN, which often have to share our data on a mandatory basis.
  • Have a relatively low cost with respect to virtual private network memberships.
  • It is much more secure 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 private server?

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

OpenVPN is a software that allows us to make a P2P connectivity, between different devices that may be in different parts of the world. One of its main characteristics is that no static IPs are needed on both sides of the tunnel.

This technology was developed in 2001 by James Yonan, which was improving thanks to the different contributions of users. It is considered one of the most practical and easy-to-use tools for those 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 your information privately, without having to upload that data to a public site or easily accessible to intruders.

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

Further, can be used with any firewall and only one port of it is needed for OpenVPN to work, since the software is the one that has the multi-ports.

OpenVPN can also function as a server waiting for incoming connections or also starting connections to it, in this way it allows it to run as a TCP service.

If we have to talk about some limitations that this technology has, we have to refer to its little knowledge among people who manage networks, we can also mention that does not support for its protocols that secure IP addresses with encryption in a data stream packet, that is to say the IPsec.

Steps to configure OpenVPN on a VPS on Windows or Linux fast and easy

Steps to configure OpenVPN on a VPS on Windows or Linux fast and easy

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

On windows

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

  • We obtain the necessary keys so that we can connect to the openvpn server using the command /build-key usuariovpn, which we will write in a DOS window.
  • We copy these keys to a USB memory, or we write cp /etc/openvpn/keys/* /media/usb
  • With this command we will obtain all the copies of the content of /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 memory with the command cp /etc/openvpn/client.conf /media/usb
  • We download OpenVPN from its official website:
  • We open the location of the executable file.
  • We choose the option “Execute as an administrator”.
  • In the message that will appear we choose the option “Yes”.
  • Next, we click on “Next”.
  • We choose all the components that we want to install.
  • We select “Next”.
  • We look for the installation path for the program, which is generally C:/Archivos de programa/OpenVPN.
  • We click on “Next”.
  • Then we press “Finish”.
  • We open our USB memory and verify its content by looking for the file “Client.conf”.
  • We change the extension of that folder to “Client.ovpn”.
  • We copy the keys from memory to the location C:/Archivos de programa/OpenVPN/config, choosing only: crt; whezzyVPN.crt; usuariovpn.key; usuariovpn.crt; ta.key y client.ovpn.
  • Now we go to the IPAP tool to know what my IP is.

In this way it is shown that our public IP is not the same as always.

To connect to the server we have to create a direct access icon and right click on it and choose the option “Execute as an administrator”.

On linux

When our operating system is Linux we will have to install a script. For this we must carry out the following step by step:

  • We go to our control panel and in the tab “Settings” we activate “TUN / TAP” Y “Dpi”.
  • We update the server by typing apt-get update Y apt-get upgrade.
  • We install OpenVPN with the command wget --no-check-certificate -O; chmod +x; ./ezopenvpn.
  • At this time all the programs that are necessary to function will be installed, we copy the file to our PC, for which we will carry out the following command scp -P 2424 root@ ~/.

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

  • We will use the following command sudo apt-get install network-manager-openvpn.
  • We select “Net”.
  • We look for the option “VPN connections”.
  • We click on “Configure VPN”.
  • We choose the option if we want a wireless or wired Internet connection.
  • We click on “Add”.
  • We open the “.Ovpn file”.
  • We click on “Create”.
  • We choose the tab “VPN”.
  • 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 from the private key.
  • We click on “Save”.

If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will also be of great help to more members of the community. Thank you! 😉

You may be interested:

Rate this post

Leave a Comment