It’s not recommended to change your resolv.conf as it will be overwritten every time you reboot your computer.
Saying that, I’m not sure if this helps you or not but I stopped using PIA’s app and started using OpenVPN using PIA servers manually. Here is a guide I use and a script I created to launch PIA and temporarily continue to use Google’s DNS servers instead of PIA’s. Not sure if it is still secure or not if I use Google’s DNS servers instead of PIA’s but it actually may be a little faster.
Guide:
- If you don’t already have OpenVPN you need to install it.
sudo apt-get install openvpn
- Move to the OpenVPN directory in /etc:
cd /etc/openvpn
- Download from the Private Internet Access website the zip folder. This folder contains all the config files for OpenVPN.
wget https://www.privateinternetaccess.com/openvpn/openvpn.zip
- Unzip the folder using unzip. If you don’t have unzip already installed in your system run the following command:
sudo apt-get install unzip
and then unzip:
sudo unzip openvpn.zip
- In order to see the list of servers to which you can connect run:
ls -l
- As you can see each server config file has .ovpn extension. Now you can run the final command to connect to the server:
sudo openvpn config-server-filename.ovpn
Once the previous command is executed you are required to insert your username and password of your Private Internet Access account. If you want to avoid to insert username and password every time you want to connect to the VPN you can follow these steps:
-
Create a .txt file in the /etc/openvpn folder (same folder of the .ovpn file) . You can name this file ‘.pass.txt‘. It’s recommended to chmod 700 on this hidden file.
-
In the first two lines of the file put your username and password, like:
username
password
auth-user-pass .pass.txt
auth-nocache
- Save and try to connect again. You should not be required to insert username and password this time.
Then here is my shell script I run every time I want to launch PIA.
#!/bin/bash
# backup copy of resolv.conf with Google's DNS servers
sudo cp /etc/resolv.conf.bk /etc/resolv.conf
cd /etc/openvpn
sudo openvpn US\ Florida.ovpn &
Of course, if you want to use a different PIA server every time you will need to configure separate scripts for the specific server and, of course, make sure you have the same edits in each .ovpn server config. Or one script that has user input that will allow you to choose what server you would like to connect to.
In this scenario, I would prefer to send my username and password encrypted but I have not figured out how to do that yet.
I realize this does not answer your question but I hope it helps you with PIA.