I was following this flake: GitHub - Fuwn/pia.nix: 🔒 Private Internet Access VPN Configurations & CLI for NixOS which helped me get the VPN started. I was also able to verify the service is up with systemctl and saw for example “openvpn-japan.service […] loaded active running”.
But when I check a what’s my ip address page, it still shows my local area. Am I missing something?
There is an issue with that repo i opened the issue around 5 months ago for the same reason. Cannot initiate a connection · Issue #2 · Fuwn/pia.nix · GitHub
I have a small module in my setup that uses the official PIA foss connections scripts dotfiles/nix/packages/Pia/pia.nix at 70b4908cf60f50e1cbe824745e097ec11e393f2a · bloodstiller/dotfiles · GitHub
I then just have these aliases in my ZSH to call the scripts and pass creds via sops or age (can’t remember)
# PIA VPN connection aliases with common parameters
pia-base =
"cd ~/Pia && sudo PIA_USER=$(cat /run/user/1000/secrets/pia_user) PIA_PASS=$(cat /run/user/1000/secrets/pia_pass) DISABLE_IPV6=yes PIA_PF=false PIA_DNS=true VPN_PROTOCOL=wireguard";
pia-ldn = "pia-base PREFERRED_REGION=uk ./get_region.sh";
pia-sth = "pia-base PREFERRED_REGION=uk_southampton ./get_region.sh";
pia-man = "pia-base PREFERRED_REGION=uk_manchester ./get_region.sh";
I was able to fix everything by dropping the crl tag in the .ovpn file. It’s the same fix that was mentioned in the github issue. Thank you for pointing that out.