WireGuard VPN – Ubuntu Server

WireGuard is the most modern and easiest way to go if you want to create an VPN Server. The guys from PiVPN created a great installer for RaspberryPi’s. But I need some more Power 🙂 So here is the fast installation guide for this:

Update and Upgrade your Server

sudo apt update
sudo apt full-upgrade

Install all needed packages

sudo apt-get install --assume-yes iptables-persistent dnsutils iptables-persistent wireguard-tools qrencode  net-tools

Now you can use the pivpn.io script to install

curl -L https://install.pivpn.io | bash

After the successful install you can create the user by typing

sudo pivpn -a

now you can edit the user profile you have created right now

nano /home/pi/configs/vs_mbp.conf 

If you leave the last line „AllowedIPs = 0.0.0.0/0, ::0/0“ like it is. Every traffic will be routed in your WireGuard VPN. If you want to have only the packages for the destination network routed you have to change it to your ip address range. For example: AllowedIPs = 10.210.0.0/24

[Interface]
PrivateKey = kPcrDnyRhjhNh+g6x3iqSR6DrFj0jRiR2GbUNgc1qFDxx=
Address = 10.6.0.2/24
DNS = 10.210.0.1, 1.1.1.1

[Peer]
PublicKey = YoKGLSuXRxv2WcaSzyVCDkIRqCW+BxHuK5VYvZg/7w0=
PresharedKey = hPvRvm5DqEreE8EXydEczi9R7Ygn4qKcrVKAVxvgH+W8=
Endpoint = X.X.X.X:51820
AllowedIPs = 0.0.0.0/0, ::0/0

I tested this installer with an Synology Virtual Machine Manager and Proxmox installation

If you don’t install the needed packages then you get following errors:

:::
::: sudo will be used for the install.
::: Hostname length OK
::: Verifying free disk space...
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with PiVPN installation...
:::    Checking for git... already installed!
:::    Checking for tar... already installed!
:::    Checking for wget... already installed!
:::    Checking for curl... already installed!
:::    Checking for grep... already installed!
:::    Checking for dnsutils... not installed!
:::    Checking for whiptail... already installed!
:::    Checking for net-tools... not installed!
:::    Checking for bsdmainutils... already installed!
:::    Checking for iptables-persistent... not installed!
/usr/bin/debconf-apt-progress: can't open /tmp/tmp.0xfbAZFK8b: Permission denied at /usr/bin/debconf-apt-progress line 249, <STDIN> line 3.
:::    Failed to install dnsutils!
:::    Failed to install net-tools!
:::    Failed to install iptables-persistent!

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Time limit is exhausted. Please reload the CAPTCHA.

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.