WireGuard on Linux

This guide is for setting up WireGuard VPN connections with our service on Ubuntu Linux 18.04. For other distributions, check the official guides at https://www.wireguard.com/install/

Important note: in this guide we will use a single server to connect to (UK5 - vpnac-wg-uk5.conf). Make sure you use the right names depending on the location you want to connect to when copying the .conf files into the /etc/wireguard/ folder and when bringing up/down the WireGuard VPN tunnel.

  1. open the terminal app and switch to root by running sudo bash
  2. run apt update && apt upgrade -y to ensure that the system is up-to-date. If the kernel has been upgraded in the process, reboot the machine
  3. install WireGuard by running add-apt-repository ppa:wireguard/wireguard && apt install wireguard resolvconf -y
  4. load the WireGuard kernel module and verify that it has been loaded: modprobe wireguard; lsmod|grep wireguard
  5. use our WireGuard key management tool to generate the .conf file(s)
  6. Download the .conf file, then move it to /etc/wireguard/. Example: cp ~/Downloads/vpnac-wg-uk5.conf /etc/wireguard/ (replace the .conf file name accordingly)
  7. set the right file permissions: chmod 600 -R /etc/wireguard/*.conf
  8. bring up the WireGuard interface: wg-quick up vpnac-wg-uk5
  9. check at https://ipx.ac/run if all is good and there are no leaks
  10. to disconnect, run (if you are already running the shell as root) wg-quick down vpnac-wg-uk5 or sudo wg-quick down vpnac-wg-uk5 as user

Other tutorials: