en:vps:jak-zainstalowac-wireguard-nat

Handbook compatible with VPS LXC (NAT)

How do I install WireGuard on the VPS LXC NAT?

First connect to the server via an SSH connection.

1 First, update the package management system by entering the following commands (may take a while):

apt-get update
apt-get upgrade


2. we create a clients folder where we will store our clients' configuration files and go:

mkdir -p /home/wireguard/clients
cd /home/wireguard/clients


3. run the command that will download the installation script and run it directly:

wget -4 https://git.io/wireguard -O /home/wireguard/wireguard-install.sh && bash wireguard-install.sh

Installer options:

  1. This server is behind NAT. What is the public IPv4 address or hostname?
    The main IPv4 address will be detected automatically and shown in square brackets, proceed by clicking Enter
  2. What port should WireGuard listen to?
    You can find the list of available ports assigned to your server in the VPS panel by going to the Network tab.
    Select the first one in the list that serves UDP or that is not occupied by another application on your server.
  3. Enter a name for the first client
    Enter your preferred device name from which you will connect to WireGuard
  4. Select a DNS server for the client
    We recommend selecting 1, as it has optimised DNS for the server
  5. Should automatic updates be enabled for it?
    Select Y (we will receive automatic updates)
The installation is complete, a QR code will be displayed, which you can scan e.g. with your phone and connect automatically (requires the WireGuard mobile app) or use the generated configuration file, which will be located in /home/wireguard/clients
  • en/vps/jak-zainstalowac-wireguard-nat.txt
  • ostatnio zmienione: 11/09/2023 03:29
  • przez reconv