This commit is contained in:
Maurice
2025-09-30 13:04:56 +02:00
parent 777f78ce6f
commit 9a0277a48d
10 changed files with 39 additions and 18 deletions

View File

@@ -30,6 +30,7 @@ cat <<EOF > /etc/wireguard/clients/$CLIENT_NAME.conf
[Interface]
Address = $NEXT_IP/24
PrivateKey = $(cat /etc/wireguard/clients/keys/$CLIENT_NAME.priv.key)
DNS = 10.0.0.1 # DNS via the VPN
# $CLIENT_NAME configuration
[Peer]

View File

@@ -12,6 +12,7 @@ cat <<EOF > /etc/wireguard/wg0.conf
PrivateKey = $(cat /etc/wireguard/server_priv.key)
Address = 10.0.0.1/24 # Server has IP in the wg network
ListenPort = 51820
DNS = 192.168.2.22 # AdGuard DNS server IP
EOF
# Enable IP forwarding, persistent

View File

@@ -0,0 +1,4 @@
#!/bin/sh
if [ "$1" = "reload" ]; then
rc-service wg-quick.wg0 restart
fi