[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=$prefix${sep}${ip}/${mask}
|
||||||
addr_nomask=$prefix${sep}${ip}
|
addr_nomask=$prefix${sep}${ip}
|
||||||
file="vpn-${addr_nomask}.conf"
|
file="${addr_nomask}.conf"
|
||||||
echo "Writing ${file} and updating gw.conf"
|
echo "Writing ${file} and updating gw.conf"
|
||||||
|
|
||||||
cat <<EOF > $file
|
cat <<EOF > $file
|
||||||
[Interface]
|
[Interface]
|
||||||
PrivateKey = $privkey
|
PrivateKey = ${privkey}
|
||||||
ListenPort = 51820
|
ListenPort = 51820
|
||||||
Address = ${addr}
|
Address = ${addr}
|
||||||
|
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = 6BRnQ+dmeFzVCH9RbM1pbJ7u3y3qrl+zUzzYCmC88kE=
|
PublicKey = ${vpnpub}
|
||||||
Endpoint = vpn-18515529.ungleich.ch:51820
|
Endpoint = ${vpngw}
|
||||||
AllowedIPs = $allowed_ips
|
AllowedIPs = ${allowed_ips}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
cat <<EOF >> gw.conf
|
cat <<EOF >> gw.conf
|
||||||
|
|
Loading…
Reference in a new issue