Guidance on usage: Wireguard Server on Linux Ubuntu 18.04 Minimal

Configuration and Connection to Wireguard Server on Linux Ubuntu 18.04 Minimal

Configuration to Wireguard Server on Linux Ubuntu 18.04 Minimal

After purchasing and starting the VM, you should know its IP address. You can find it in the personal account of Azure. (You need to select the virtual machine from the list. By clicking the item “Overview”, your IP is displayed in the line “Public IP Address”).

You should allow access by port UDP – 51280, which you can do in properties of the Azure firewall network. 

With the PuTTY application 

  1. To do this, you need the PuTTY application to connect via ssh. You can download it at the following link – Download
  2. Run PuTTY, enter the VM address in the “Host” field and click “Open” to connect.
  1. In the opened console, it is necessary to enter a password that was specified while creating the virtual machine.
  1. After confirming the password, you get into the VM
  1. Next, you need to enter the following command to create a user

$ sudo addvpnuser

  1. Enter the username and press Enter button
  1. Next, one of the free IP addresses will be offered, press Enter
  1. The console displays the QR code for mobile devices and the path to the config.
  1. Enter the command:

$ sudo cat /etc/wireguard/usercfg/wg0.test_user.conf

  1. Copy the part of the code highlighted in the screenshot using Ctrl + C.
  1. Create a blank text document and paste the copied part of the code into it using Ctrl + V.
  1. Press File, then Save as.
  1. In the line Save as type, select All files from the drop-down list. In the File name line, enter the file name and the “.conf” extension. Save the document by clicking on the Save button.

Connection to Wireguard Server on Linux Ubuntu 18.04 Minimal

  1. Next, you need to install the Wireguard app. Download link: https://www.wireguard.com/install/ Launch the application.
  2. Click on the Import tunnel(s) from the button and select the file that was created earlier.
  1. Press the Activate button

Congratulations! We hope this tutorial helped you configure the WireGuard VPN server and client. This setup allows you to surf the web anonymously by keeping your traffic data private.