[wireguard] add variables for endpoints
This commit is contained in:
parent
8d4803b888
commit
307761fcc7
1 changed files with 5 additions and 5 deletions
|
@ -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 <<EOF > $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 <<EOF >> gw.conf
|
||||
|
|
Loading…
Reference in a new issue