Skip to main content

WireGuard

WireGuard Server

WireGuard Client

wg-quick
sudo apt install wireguard

/etc/wireguard/wg0.conf

#
# Use this configuration with WireGuard client
#
[Interface]
Address = XX.XX.XX.XX/32
PrivateKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
DNS = ZZZ.ZZZ.ZZZ.ZZZ, YYY.YYY.YYY.YYY
[Peer]
PublicKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AllowedIPs = 0.0.0.0/0
Endpoint = somedomain.com:51820

Up & Down the wg link

sudo wg-quick up wg0
sudo wg
sudo journalctl -fu wg-quick@wg0

sudo wg-quick down wg0
nmcli
# Import the config file
$ CONF_FILE="wg0.conf"
$ nmcli connection import type wireguard file "$CONF_FILE"

# Show the profiles
$ nmcli
$ nmcli conn show   # List all profiles
$ nmcli conn show <name>  # Display the details for specified profile

# Delete the profile
$ nmcli connection delete wg0

# Modify the profile my-wg0
$ nmcli connection modify my-wg0 \
    autoconnect yes \
    ipv4.method manual \
    ipv4.addresses 192.168.7.5/24 \
    wireguard.listen-port 50000 \
    ...

Algo VPN

  • Algo VPN is a set of Ansible scripts that simplify the setup of a personal WireGuard and IPsec VPN.

NetBird

PiVPN

PiVPN is a lightweight, open-source project designed to simplify setting up a VPN server on a Raspberry Pi or any Debian-based system.

It supports WireGuard and OpenVPN, allowing you to create a secure, private tunnel to your home network or VPS.