Skip to content

Commit

Permalink
Add option for port number
Browse files Browse the repository at this point in the history
  • Loading branch information
ldogge authored Mar 20, 2024
1 parent 13e95c2 commit 40f0f77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 40f0f77

Please sign in to comment.