diff --git a/wireguard-install.sh b/wireguard-install.sh index 5f3f8bb..1eb4263 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -239,6 +239,12 @@ function newClient() { fi done + if [[ ${DOT_EXISTS} == '1' ]]; then + echo "" + echo "The subnet configured supports only 253 clients." + exit 1 + fi + until [[ "${IPV4_EXISTS}" == '0' ]]; do read -rp "Client's WireGuard IPv4: ${SERVER_WG_IPV4::-1}" -e -i "${DOT_IP}" DOT_IP CLIENT_WG_IPV4="${SERVER_WG_IPV4::-1}${DOT_IP}"