From 40f0f77e622080293737830851cd85ae5f6a523b Mon Sep 17 00:00:00 2001 From: Luc Dogge Date: Wed, 20 Mar 2024 13:45:49 +0100 Subject: [PATCH] Add option for port number --- vpn.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vpn.sh b/vpn.sh index d5d22ee..96a7fb3 100755 --- a/vpn.sh +++ b/vpn.sh @@ -31,6 +31,7 @@ check_rpi_model 3 # Ask for input for variables ask_user "SERVER_PUBLIC_IP" "8.8.8.8" "Enter the public ip-address of the Wireguard server" "str" +ask_user "SERVER_PORT" "51820" "Enter the port number of the Wireguard server" "str" ask_user "SERVER_PUBLIC_KEY" "GQ4G7V+uRFRbqzYTgNHLd58o+RNPUW99L7Nc7mTt2Hs=" "Enter the public key of the Wirguard server" "str" ask_user "NETWORK" "172.18.1.0/24" "Enter the network range you want to allow to connect" "str" ask_user "RASPBERRY_ADDRESS" "172.18.1.2" "Enter the private ip-address this device should have" "str" @@ -71,7 +72,7 @@ PrivateKey = $GENERATED_PRIVATE_KEY [Peer] PublicKey = $SERVER_PUBLIC_KEY -Endpoint = $SERVER_PUBLIC_IP:51820 +Endpoint = $SERVER_PUBLIC_IP:$SERVER_PORT AllowedIPs = $NETWORK PersistentKeepalive = 25 EOL