Gediminas Lelešius

VPN on Raspberry Pi 2 B


Setuping WireGuard VPN server on RaspberryPi (tested on buster and bullseye).

Installing VPN server

curl -L | bash
Choose WireGuard.

Creating VPN user

pivpn add
Enter username.

Generated key will be stored in ~/configs.
It can be copied as plaintext into user computer.

Fixing iptables

For some reason, VPN doesn't work right away. Connection is established but only RPi can be accessed.

To fix that, run sudo pivpn -d and enter y when asked to fix routes.
Reboot might be needed.

Installing VPN client

Windows doesn't natively support WireGuard VPN so install WireGuard dekstop app.
Import configuration file generated before.

Debian: use wg-quick