Connecting to a VPN on a Linux server
Requirements
- Purchased service VPN Pro
- Purchased service VPS and system Debian / Ubuntu
- WireGuard client installed
- Installed WinSCP
Instructions
In this guide, the downloaded tunnel configuration is referred to as Konfigurace.conf. You can find instructions on how to download the configuration in a separate guide here. Once you have downloaded the configuration, open a program such as WinSCP on your computer.
Uploading the VPN configuration to the server
- Log in instructions here:
- After logging in, go to /tmp and place the configuration downloaded from your computer there:
- You can now disconnect.
Configuration on a Linux server
Below, you will find a set of commands for installing and setting up the VPN. You can use the console access within the administration interface, or the PuTTY program along with the provided instructions.
1. Installing the WireGuard client
sudo apt update
sudo apt install -y wireguard
2. Uploading a configuration that you manually moved to the server
sudo install -d -m 700 /etc/wireguard
sudo mv /tmp/Konfigurace.conf /etc/wireguard/Konfigurace.conf
sudo chown root:root /etc/wireguard/Konfigurace.conf
sudo chmod 600 /etc/wireguard/Konfigurace.conf
3. Launching the client
sudo wg-quick up Konfigurace
4. Configuration Verification
sudo wg show
ip addr show Konfigurace
5. Shutting down the client
sudo wg-quick down Konfigurace
6. Automatic client startup after server startup
sudo systemctl enable --now wg-quick@Konfigurace
7. Starting the client
sudo wg-quick up Konfigurace
- Finally, use this command to verify that you are connected via VPN. You should see the IP address assigned to you:
sudo wg show
curl https://icanhazip.com

