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.
As can be seen from the comparison table, WireGuard shows not only the highest speed, but also the best ping result..
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:
Then download the installation script:
Making the script executable:
And start the installation:
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.
As a result, after running the script, all we have to do is press Enter to confirm our consent to install the recommended settings.
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.
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.
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.
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.
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:
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.
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.
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](https://sun9-70.userapi.com/impg/_IJVtqXkhT4WJhvQrJBFbe1l1MmECKq4kwQZwQ/KPgBBsZvoKs.jpg?size=807x575&quality=96&sign=3b03a356205356e9137c32bec082fa86&type=album)
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](https://sun9-73.userapi.com/impg/Af_4b8CUar6HupBT8ji-IvaEPTOoc8vJFOLxEA/heZrlR3yM0A.jpg?size=517x134&quality=96&proxy=1&sign=77743021d47d4fe84cca289e8a8fa284&type=album)
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](https://sun9-24.userapi.com/impg/R-ei4jzZE_akCZFZ3rihJyXzOwtEC65kTR6q2Q/reI8c0IQNlw.jpg?size=562x877&quality=96&proxy=1&sign=c735329f97b119cd671124083da7c0a4&type=album)
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](https://sun9-67.userapi.com/impg/sSnajS3mgqJRMcEqW58G3wJmEU9S1_LOcydX9g/lqNsrmKSGlQ.jpg?size=717x46&quality=96&proxy=1&sign=c16e827c4d80a9b350fb8b33a46eaeed&type=album)
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](https://sun9-14.userapi.com/impg/uzekpUodvMQ-gwXdbBLW1Fgti1y6-lqHp4rZGA/8j7zrJeby5w.jpg?size=807x760&quality=96&sign=c4c1d7b5baaf7d60cd3e6859ae6909c1&type=album)
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](https://sun9-48.userapi.com/impg/-4giErY9CI-KuHKPnGm2h50jVBLBIZffLOjnPw/idbeIeHZuTQ.jpg?size=997x2160&quality=96&proxy=1&sign=c920f3735201a596886cc53a6a94a60d&type=album)
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](https://sun9-22.userapi.com/impg/EZO3NiuPQ5EF4B1yEnRVn67hFngVG4OjR808Ug/8bm57yn4NTU.jpg?size=997x2160&quality=96&proxy=1&sign=4e707b41090f305532fe1f10164418bc&type=album)
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](https://sun9-23.userapi.com/impg/9xLR5ogaOTpkgb7601OKFgaQLW4KQaRNDDAsTQ/rUmck_Gtcb8.jpg?size=509x227&quality=96&proxy=1&sign=055c47dfdc2f18511d2e263e865dc1d7&type=album)
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](https://sun9-75.userapi.com/impg/N1oORqfbRtQbjExa0kSAexd7kBVLhW6cN5dKeg/UlVTOp12YrE.jpg?size=807x538&quality=96&sign=0fd2f9354388713adbe4bf62fe4ad8d3&type=album)
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.