- SSH access to the server
- WireGuard installed on the server
Install WireGuard with:
sudo apt update && sudo apt install wireguardSSH into your server and generate WireGuard keys:
sudo mkdir -p /etc/wireguard
wg genkey | sudo tee /etc/wireguard/privatekey | wg pubkey | sudo tee /etc/wireguard/publickeyCreate the WireGuard configuration at /etc/wireguard/wg0.conf:
[Interface]
PrivateKey = <SERVER_PRIVATE_KEY>
Address = 10.8.0.1/24
ListenPort = 51820
# kiosk 1
[Peer]
PublicKey = <KIOSK_PUBLIC_KEY>
AllowedIPs = 10.8.0.101/32
# kiosk 2
[Peer]
PublicKey = <KIOSK_PUBLIC_KEY>
AllowedIPs = 10.8.0.102/32sudo wg-quick up wg0
sudo systemctl enable wg-quick@wg0After adding additional clients to the config, restart the VPN using:
sudo wg-quick down wg0
sudo wg-quick up wg0