How to install a VPN? (On a VPS)
For a VPN, you can use different software. In this tutorial, we will install WireGuard and OpenVPN!
Last updated
For a VPN, you can use different software. In this tutorial, we will install WireGuard and OpenVPN!
Last updated
A VPN is a secure tunnel on the Internet that encrypts your Internet traffic and protects your online privacy. It ensures that no one else can see what you are doing on the Internet and where you are. For example, you can safely use public Wi-Fi networks and bypass geographical restrictions to access content that would otherwise be unavailable. It also makes your own IP address unavailable.
WireGuard is faster, more secure and easier to configure than OpenVPN, but has less support because it is a relatively new technology. WireGuard and OpenVPN are both secure for setting up VPN connections. But because WireGuard uses newer cryptographic technologies, it is generally considered more secure.
Go to the WireGuard installation.
Go to the OpenVPN installation.
Make sure your VPS has the latest packages. This can be done with: sudo
apt update && sudo apt upgrade
Download the installation script from github. This can be done with the following command: curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh
Make sure the file is executable. This can be done with the following command: chmod +x wireguard-install.sh
Now start the installation. This can be done with the following command: ./wireguard-install.sh
Once you have started the installation you will be given a number of options, take over the following
Now the installation is complete. To copy the credentials you run the following command: cat wg0-client-<client name>.conf
. You will get a number of lines of text. Copy this and paste it into your WireGuard.
WireGuard Windows download: https://download.wireguard.com/windows-client/wireguard-installer.exe
Once you have downloaded and opened WireGuard press ctrl + N and paste the text you just copied from SSH. At 'Name' you can enter your own name.
Now press "Save" and then "Activate.
Now you have managed to install a WireGuard VPN on your VPS and connect with it on your PC/Laptop.
Make sure your VPS has the latest packages. This can be done with: sudo
apt update && sudo apt upgrade
Download the installation script from github. This can be done with the following command: curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
Make sure the file is executable. This can be done with the following command: chmod +x openvpn-install.s
Now start the installation. This can be done with the following command: ./openvpn-install.sh
Once you have started the installation you will be given a number of options, take over the following
Congrats the installation of OpenVPN is complete and you have created a user.
Download the latest OpenVPN version at https://openvpn.net/community-downloads/
Download the OpenVPN profile from your VPS. To do this you must connect to the SFTP of your VPS. If you do not know how to do this we have a tutorial here: How do I open a sftp session to a vps?
Find the config file on your PC and drag it into your OpenVPN config folder. Often, this is C:\Program Files\OpenVPN\config
.
Once this is done press the small arrow at the bottom right (Windows Arrow beside your language settings on the navigation bar), then OpenVPN and then connect.
See if your IP address has really changed at https://www.watismijnip.nl/
Now you have succeeded in installing an OpenVPN on your VPS and using it to connect on your PC/Laptop.