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 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
- To work, you must open port 51280 (UDP) in the network properties in the Amazon firewall.
- Install PuTTY. Link to download the application – https://putty.org.ru/download.html. Start PuTTY.
- 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
- Go to the SSH section on the left pane, and then to Auth.
- In the Auth section, click <Browse> and specify the path to the .ppk file that was generated earlier.
- Go to the Sessions section, enter the IP address of the virtual machine and click <Open>.
- In the window that appears, click <Accept>.
- 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.
- Next, you need to enter the following command to create a user
- Enter the username and press the <Enter> button.
- Next, one of the free ip addresses will be offered, press <Enter>
- The console displays the QR code for mobile devices and the path to the config.
- Enter the command:
sudo cat /etc/wireguard/usercfg/wg0.user4.conf
- Copy the part of the code highlighted in the screenshot using Ctrl + C.
- Create a blank text document and paste the copied part of the code into it using Ctrl + V.
- Press <File>, then <Save as>.
- 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.
- Next, you need to install the Wireguard app. Download link: https://www.wireguard.com/install/. Launch the application.
- Click on the <Import tunnel(s) from> button and select the file that was created earlier.
- Press the <Activate> button.