Closed Baenwort closed 3 years ago
Thanks. I'm not sure what that's all about, but it's merged. I never used Wireguard. Just to be clear, these scripts and all the magic came from pia-foss/manual-connections; I was just trying to get them going on FreeNAS/FreeBSD.
Fixed merged in.
In the section:
This script got started with PIA_PF=true. We will allow WireGuard to fully initialize and after that we will try to enable PF by running the following command: $ PIA_TOKEN=$PIA_TOKEN \\ PF_GATEWAY=\"$(echo "$wireguard_json" | jq -r '.server_vip')\" \\ PF_HOSTNAME=\"$WG_HOSTNAME\" \\ ./port_forwarding.sh
which starts on line 166 of connect_to_wireguard_with_token.sh you have to many \ and you are missing some exporting of the gateway and hostname to enable them to be used by the port_forwarding.shthe code should be (and makes this function for me):
PIA_TOKEN=$PIA_TOKEN \ PF_GATEWAY="$(echo "$wireguard_json" | jq -r '.server_vip')" \ export PF_GATEWAY PF_HOSTNAME="$WG_HOSTNAME" \ export PF_HOSTNAME