|
@@ -660,6 +660,7 @@ EOF
|
|
PublicKey = ${CLIENT_PUBLIC_KEY}
|
|
PublicKey = ${CLIENT_PUBLIC_KEY}
|
|
AllowedIPs = ${CLIENT_WG_IPV4}/32,${CLIENT_WG_IPV6}/128
|
|
AllowedIPs = ${CLIENT_WG_IPV4}/32,${CLIENT_WG_IPV6}/128
|
|
PresharedKey = ${CLIENT_PRE_SHARED_KEY}
|
|
PresharedKey = ${CLIENT_PRE_SHARED_KEY}
|
|
|
|
+PersistentKeepalive = 25
|
|
EOF
|
|
EOF
|
|
else
|
|
else
|
|
cat > ${new_client_if} <<EOF
|
|
cat > ${new_client_if} <<EOF
|
|
@@ -680,6 +681,7 @@ EOF
|
|
PublicKey = ${CLIENT_PUBLIC_KEY}
|
|
PublicKey = ${CLIENT_PUBLIC_KEY}
|
|
AllowedIPs = ${CLIENT_WG_IPV4}/32
|
|
AllowedIPs = ${CLIENT_WG_IPV4}/32
|
|
PresharedKey = ${CLIENT_PRE_SHARED_KEY}
|
|
PresharedKey = ${CLIENT_PRE_SHARED_KEY}
|
|
|
|
+PersistentKeepalive = 25
|
|
EOF
|
|
EOF
|
|
fi
|
|
fi
|
|
chmod 600 ${new_client_if}
|
|
chmod 600 ${new_client_if}
|