Guide – How To Start – WireGuard VPN Tunnel on Linux CentOS 7.9 on Amazon

WireGuard is a communication protocol and open-source software that implements encrypted virtual private networks and was designed with the goals of ease of use, high-speed performance, and low attack surface.

This image has an empty alt attribute; its file name is orange.png

This is a quick deployment and ready-to-run image.
Simple and rapid installation. Easy to maintain.

The guide on how to connect to WireGuard VPN Tunnel on Linux CentOS 7.9

To start the server, start the virtual machine through Amazon

  1. To work, you must open port 51280 (UDP) in the network properties in the Amazon firewall.
  1. Install PuTTY. Link to download the application – Start PuTTY.
  1. To connect to a virtual machine, you need to generate a “private key” in advance. This can be done using the following instructions (by choosing the “file format:” option “.ppk” in step 3)

 Guide – How To – Create and use Key Pair to connect to a VM

  1. Go to the SSH section on the left pane, and then to Auth.
  1. In the Auth section, click <Browse> and specify the path to the .ppk file that was generated earlier.
  1. Go to the Sessions section, enter the IP address of the virtual machine and click <Open>.
  1. In the window that appears, click <Accept>.
  1. In the console that opens, you must enter the standard login that appears when creating a virtual machine – centos.

        Or use the User name that was specified after the VM was created.

  1. Next, you need to enter the following command to create a user

sudo addvpnuser

  1. Enter the username and press the <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.user4.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 “File name” line, enter the file name and the .conf extension. In the line <Save as type> select All files from the drop-down list. Save the document by clicking on the <Save> button.
  1. Next, you need to install the Wireguard app. Download link: Launch the application.
  1.  Click on the <Import tunnel(s) from> button and select the file that was created earlier.
  1. Press the <Activate> button.

Website Built with

Up ↑

%d bloggers like this: