VPNKillSwitch works on Debian systems, including Raspberry Pi (Raspbian). The service will keep your OpenVPN client connected and prevent data transmission if connection to the VPN is lost.
Hi there! Loving the script but found a (minor?) bug and have a feature request (I'll add it as a different issue). I set my DNS server to PIA's, but it appeared, after I installed your script, that it wasn't able to resolve google.com, so it entered a somewhat out-of-control situation where the ping was failing, it would try to restart the vpn, and then it repeated every 5 seconds. I killed the process, and modified the run.sh to use the IP address of google.com (e.g. 216.58.216.78), rather than the domain name, and it appears to have solved the problem. Any ideas why this might be? Might be worth modding if this has something to do with the PIA DNS servers.
Hi there! Loving the script but found a (minor?) bug and have a feature request (I'll add it as a different issue). I set my DNS server to PIA's, but it appeared, after I installed your script, that it wasn't able to resolve google.com, so it entered a somewhat out-of-control situation where the ping was failing, it would try to restart the vpn, and then it repeated every 5 seconds. I killed the process, and modified the run.sh to use the IP address of google.com (e.g. 216.58.216.78), rather than the domain name, and it appears to have solved the problem. Any ideas why this might be? Might be worth modding if this has something to do with the PIA DNS servers.