Client VPN Setup - Linux

Install WireGuard

On Ubuntu 20.04 you can install WireGuard directly from the default package sources. You also need to install resolvconf. Open a Terminal window and type:

sudo apt install wireguard resolvconf

For other Linux distributions check your documentation or take a look in https://www.wireguard.com/install/

Download VPN Settings

Login to the Settings page and click on the Download link to download the WireGuard settings for the Linux machine.

SettingsPage.png

Save the file to your Downloads folder. From the Terminal window copy the VPN settings from the your Downloads folder to /etc/wireguard and start wireguard:

sudo cp Downloads/wg0.conf /etc/wireguard
sudo wg-quick up wg0

Open your browser and browse to a page that will show you information about your IP address e.g. https://iplocation.io to check the VPN is working and you're emerging from the country of your choice.

Start VPN Automatically (Optional)

To bring up the VPN connection on system start:

systemctl enable wg-quick@wg0.service

Block non-VPN Traffic (Optional)

If you want to only communicate using the VPN tunnel replace the VPN IP address and port number below using your VPN settings and run:

ufw enable
ufw default deny incoming
ufw default deny outgoing
ufw allow out to [VPN IP Address] proto udp port [VPN Port Number]
ufw allow out on wg0 proto tcp to 0.0.0.0/0
ufw allow out on wg0 proto udp to 0.0.0.0/0