From 307761fcc7f001dd73be3abb519c14f8310cbb2c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 31 Dec 2021 20:22:37 +0100 Subject: [PATCH] [wireguard] add variables for endpoints --- wireguard/gen-tunnels.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wireguard/gen-tunnels.sh b/wireguard/gen-tunnels.sh index 987bfae..0251c07 100755 --- a/wireguard/gen-tunnels.sh +++ b/wireguard/gen-tunnels.sh @@ -41,19 +41,19 @@ for ip in $(seq $start $end); do addr=$prefix${sep}${ip}/${mask} addr_nomask=$prefix${sep}${ip} - file="vpn-${addr_nomask}.conf" + file="${addr_nomask}.conf" echo "Writing ${file} and updating gw.conf" cat < $file [Interface] -PrivateKey = $privkey +PrivateKey = ${privkey} ListenPort = 51820 Address = ${addr} [Peer] -PublicKey = 6BRnQ+dmeFzVCH9RbM1pbJ7u3y3qrl+zUzzYCmC88kE= -Endpoint = vpn-18515529.ungleich.ch:51820 -AllowedIPs = $allowed_ips +PublicKey = ${vpnpub} +Endpoint = ${vpngw} +AllowedIPs = ${allowed_ips} EOF cat <> gw.conf