From 3b342e531c06160c54d354a55b8fca39fa6c855c Mon Sep 17 00:00:00 2001 From: randomshell <43271778+randomshell@users.noreply.github.com> Date: Fri, 3 Apr 2020 16:16:59 +0000 Subject: [PATCH] Prompt with random port during setup (#64) --- wireguard-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"