aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomshell <43271778+randomshell@users.noreply.github.com>2020-04-03 16:16:59 +0000
committerGitHub <noreply@github.com>2020-04-03 18:16:59 +0200
commit3b342e531c06160c54d354a55b8fca39fa6c855c (patch)
treee8899d10c524f1fb21bf75c8b3c4d0480acc25da
parent01bdb56b98d5e8a8f59ca2c626ee66efc5b8957a (diff)
Prompt with random port during setup (#64)
-rw-r--r--wireguard-install.sh3
1 files changed, 2 insertions, 1 deletions
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"