/WG-AutoSetup

Script to install and setup WireGuard as well as 1 WireGuard Client on Ubuntu 18.04 LTS.

Primary LanguageShellGNU General Public License v3.0GPL-3.0

WG-AutoSetup

Script will install and setup WireGuard as well as 1x WireGuard Client on Ubuntu 18.04 LTS.

Prerequisites

  • UDP Port that you intend to use for WireGuard forwarded through any external Firewall/Router
  • Ubuntu 18.04 LTS installed and logged in
  • Domain pointing at the Ubuntu Server IP that will be running WireGuard
  • Name of Network Adapter that is externally reachable

In the Terminal enter ifconfig

Domain name should be forwarded to the external IP address (e.g. 111.222.333.444 in the screenshot below)

Determine which network is externally reachable (e.g. ens3 in the screenshot below)

ifconfig screenshot

Installation

Once logged into Ubuntu as root, enter the following into the Terminal:

  1. wget https://raw.githubusercontent.com/Mattyfaz/WG-AutoSetup/master/WG-AutoSetup.sh
  2. chmod +x WG-AutoSetup.sh
  3. ./WG-AutoSetup.sh

Follow the prompts, once complete the Terminal will display a QR code to be Scanned via the WireGuard Mobile App (Android or iOS)

  1. Scan QR Code on Mobile App
  2. Restart Ubuntu (mandatory!)

Once Ubuntu has restarted your WireGuard VPN should be active and you can now connect.