Skip to main content

Wireguard VPN erstellen

Ganz einfach Möglichkeit ist es, das VPN als PiVPN zu installieren

Installation

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


Yes, that's it! It is *almost* that simple.
To elaborate a little more, you will want to install Raspberry Pi OS Lite on a Raspberry pi, we strongly recommend using the latest Raspberry Pi OS Lite image but the normal Raspberry Pi OS image will work as well, preferably enable ssh access and then begin.
After install, you may need to open a port on your router.
There is a (now slightly outdated) guided walkthrough of the install available here.
More information is also available on the PiVPN GitHub


Konfiguration eines Clients

Generating Private and Public Keys

WireGuard works by encrypting the connection using a pair of cryptographic keys. The key pair is used by passing the public key to the other party, which can then encrypt its message so that it can only be decrypted with the corresponding private key. To secure two-way communication, each side must have its own private and public keys, since each pair provides only one-way messaging.

Generate a client public and private key pair by running the following command:

pivpn -add

die public keys befinden sich im Ordner /home/pivpn/config

Wireguard Client konfigurieren

Diese Vorgehensweise für einen Wireguard Client funkioniert und wurde erfolgreich auf Kali getestet

sudo apt install wireguard resolvconf # Software installieren

sudo cp /media/kali/persitence/tails.conf /etc/wireguard/wg0-client-01.conf # Configdatei speichern

# Berechtigungen zuordnen
sudo chown root:root /etc/wireguard/wg0-client-01.conf
sudo chmod 644 /etc/wireguard/wg0-client-01.conf
sudo chmod 755 /etc/wireguard

# Starten
sudo wg-quick up /etc/wireguard/wg0-client-01.conf

# Stoppen
sudo wg-quick down /etc/wireguard/wg0-client-01.conf

#Status
sudo wg