diff --git a/wireguard-install.sh b/wireguard-install.sh index a35efe6..4221da6 100644 --- a/wireguard-install.sh +++ b/wireguard-install.sh @@ -52,7 +52,8 @@ read -rp "Server's WireGuard IPv4 " -e -i "$SERVER_WG_IPV4" SERVER_WG_IPV4 SERVER_WG_IPV6="fd42:42:42::1" read -rp "Server's WireGuard IPv6 " -e -i "$SERVER_WG_IPV6" SERVER_WG_IPV6 -SERVER_PORT=1194 +# Generate random number within private ports range +SERVER_PORT=$(shuf -i49152-65535 -n1) read -rp "Server's WireGuard port " -e -i "$SERVER_PORT" SERVER_PORT CLIENT_WG_IPV4="10.66.66.2"