diff options
author | randomshell <43271778+randomshell@users.noreply.github.com> | 2020-04-03 16:16:59 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 18:16:59 +0200 |
commit | 3b342e531c06160c54d354a55b8fca39fa6c855c (patch) | |
tree | e8899d10c524f1fb21bf75c8b3c4d0480acc25da | |
parent | 01bdb56b98d5e8a8f59ca2c626ee66efc5b8957a (diff) |
Prompt with random port during setup (#64)
-rw-r--r-- | wireguard-install.sh | 3 |
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" |