Guidance on usage: Wireguard Server on Linux Red Hat 8.6

Configuration and connection to Wireguard Server on Linux Red Hat 8.6

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”.

To work, you should open ports 51280-51282 UDP in the network properties in the Azure firewall.

Connection to Wireguard Server

  1. To manage with a Wireguard Server server you should connect to a VM.
    1. With OpenSSH

In the Windows 10 operating system (starting with version 1809 ), an OpenSSH client is available, with which you can connect to Linux servers via SSH. If Windows 10 is suitable and the OpenSSH client is installed, you can start connecting via SSH. To do this, launch a normal Windows command prompt and enter the command “ssh user@*vm_ip*” (1), where “user” is the username that was specified while creating the virtual machine and “*vm_ip*” is the VM IP address.

Then type “Yes” (2) and enter a password (3) that was specified while creating the virtual machine.

  1. With the PuTTy application 

To do this you need the PuTTy application to connect via ssh. You can download it at the following link – Download

Run Putty, enter the VM address in the “Host” field (1) and click “Open” (2) to connect.

In the opened console you will need to enter a username (1) and password (2) that were specified while the VM was being created (you’ll not see the password in the console while entering it). 

  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 mobile device QR codes and the config’s path.
  1. Enter the command to open the configuration file:

$ 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

  1. Next, you need to install the Wireguard app. Download link – Installation – WireGuard. Launch the application.
  1. Click on the Import tunnel(s) from the button and select the file created earlier.
  1. Press the Activate button
  1. Congratulations! I 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.

You can check the change in your IP on What Is My IP by going to it before connecting to WireGuard Server and after connecting.