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