After installing PIA provided ovpn files into /etc/openvpn
, create a file under /etc/openvpn/pia.txt
with your credentials
in it. Then install network-manager-openvpn
, which provides the update-resolv-conf
script. Update the ovpn files to
use the script, which resolves DNS issues:
IFS=$(echo -en "\n\b")
for f in $(ls /etc/openvpn/*.ovpn); do
echo "script-security 2" >> ${f}
echo "up /etc/openvpn/update-resolv-conf" >> ${f}
echo "down /etc/openvpn/update-resolv-conf" >> ${f}
done
Or install openvpn-systemd-resolved
from the repos and update the ovpn files to use the /etc/openvpn/update-systemd-resolved
script, instead.