fix port forwarding call from connect_to_wireguard_with_token.sh

This commit is contained in:
Ferdinand Holzer 2023-12-19 19:30:16 +01:00
parent e956c57849
commit df10ee4eb6
No known key found for this signature in database
GPG Key ID: 03FACC77A8697A63

View File

@ -183,11 +183,13 @@ if [[ $PIA_CONNECT == "true" ]]; then
--> ${green}wg-quick down pia${nc} <-- --> ${green}wg-quick down pia${nc} <--
" "
WG_SERVER_VIP=$(echo "$wireguard_json" | jq -r '.server_vip')
# This section will stop the script if PIA_PF is not set to "true". # This section will stop the script if PIA_PF is not set to "true".
if [[ $PIA_PF != "true" ]]; then if [[ $PIA_PF != "true" ]]; then
echo "If you want to also enable port forwarding, you can start the script:" echo "If you want to also enable port forwarding, you can start the script:"
echo -e "$ ${green}PIA_TOKEN=$PIA_TOKEN" \ echo -e "$ ${green}PIA_TOKEN=$PIA_TOKEN" \
"PF_GATEWAY=$WG_SERVER_IP" \ "PF_GATEWAY=$WG_SERVER_VIP" \
"PF_HOSTNAME=$WG_HOSTNAME" \ "PF_HOSTNAME=$WG_HOSTNAME" \
"./port_forwarding.sh${nc}" "./port_forwarding.sh${nc}"
echo echo
@ -208,12 +210,12 @@ if [[ $PIA_CONNECT == "true" ]]; then
echo -e "Starting procedure to enable port forwarding by running the following command: echo -e "Starting procedure to enable port forwarding by running the following command:
$ ${green}PIA_TOKEN=$PIA_TOKEN \\ $ ${green}PIA_TOKEN=$PIA_TOKEN \\
PF_GATEWAY=$WG_SERVER_IP \\ PF_GATEWAY=$WG_SERVER_VIP \\
PF_HOSTNAME=$WG_HOSTNAME \\ PF_HOSTNAME=$WG_HOSTNAME \\
./port_forwarding.sh${nc}" ./port_forwarding.sh${nc}"
PIA_TOKEN=$PIA_TOKEN \ PIA_TOKEN=$PIA_TOKEN \
PF_GATEWAY=$WG_SERVER_IP \ PF_GATEWAY=$WG_SERVER_VIP \
PF_HOSTNAME=$WG_HOSTNAME \ PF_HOSTNAME=$WG_HOSTNAME \
./port_forwarding.sh ./port_forwarding.sh
fi fi