Installing WireGuard VPN server in 5 minutes

Carder

Professional
Messages
2,619
Reputation
9
Reaction score
1,719
Points
113
Consider an easy way to install The new wireguard VPN Protocol on an Ubuntu server and create configuration files for connecting clients (peers)

WireGuard is a fairly new VPN Protocol that is gaining popularity. It is notable for its high performance and the use of modern cryptography.

On the official website, you can find a comparative performance table of popular VPN protocols.

KPgBBsZvoKs.jpg

As can be seen from the comparison table, WireGuard shows not only the highest speed, but also the best ping result..

Quick installation of WireGuard Manager​

In addition to installing the WireGuard server itself, tools for working with It will also be installed, such as calling the console interface to change the VPN server settings, easily adding new clients (peers), deleting and updating them.

We will install this VPN from the github repository complexorganizations / wireguard-manager.

The following operating systems are supported for installation using this script: CentOS, Debian, Ubuntu, Arch, Fedora, Redhat, Raspbian with Linux kernel 3.1 and higher.

In this case, we will consider installing on an Ubuntu server.

First install the curl tool:

Code:
sudo apt install curl

Then download the installation script:

Code:
curl https://raw.githubusercontent.com/complexorganizations/wireguard-manager/master/wireguard-server.sh --create-dirs -o /etc/wireguard/wireguard-server.sh

Making the script executable:

Code:
chmod +x /etc/wireguard/wireguard-server.sh

And start the installation:

Code:
bash /etc/wireguard/wireguard-server.sh

If the required packages are missing, the script will notify you about this. We reinstall, if necessary, the necessary packages and run the installation script again.

The installation is divided into stages, where the user is asked to choose different options, and by default, the best option is offered.

heZrlR3yM0A.jpg

As a result, after running the script, all we have to do is press Enter to confirm our consent to install the recommended settings.

reI8c0IQNlw.jpg

The script will also suggest installing an unbound DNS server, a good solution for better privacy. In the future, you can set up an alternative DNS service for clients (peers).

At the last stage of configuration, we set a name for the client configuration file.

lqNsrmKSGlQ.jpg

Configuring and then installing WireGuard will take no more than 5 minutes.

Upon completion of the installation, a QR code for activation will be displayed.

8j7zrJeby5w.jpg

You can download the client application for the desired operating system from the official website.

The Android version of the app supports establishing a connection via qr code.

The Android version also allows you to change the configuration file, and also contains a white and black list of applications that will work through the wireguard VPN tunnel.

idbeIeHZuTQ.jpg

To do this, click on the name of the created tunnel, then on the pencil icon in the upper-right corner, and then the All Application option will be available in the window that opens.

In the same place, in the configuration settings, you can manually change the DNS server, for example, to a server with ad blocking and phishing, for example, to Comss. one DNS.

8bm57yn4NTU.jpg

Important: you need to generate a separate configuration file for each individual device.

Configuration files accesses in the directory /etc/wireguard/clients/.

So we need to create another configuration file for the Windows client. To do this, we run the WireGuard Manager script using the command:

Code:
bash /etc/wireguard/wireguard-server.sh

rUmck_Gtcb8.jpg

And select the Add WireGuard Peer option (number 5), set a new name. We will be offered a qr code again, but to connect in Windows, we will need a configuration file that can be downloaded from the directory /etc/wireguard/clients/.

For convenient work with the server, both with the console and with files, I work through the Snowflake application.

Install the client application for Windows.

And import the configuration file downloaded from the server into it.

Similar to the Android app, you can edit the file and replace the DNS server in it, if necessary.

UlVTOp12YrE.jpg

As you can see, using the WireGuard Manager script, we can install WireGuard VPN as easily as possible, but it is also easy to create new configuration files for connecting.
 
Top