You are not logged in.
Hi all, quick question, I installed the piavpn-bin package from AUR and its all working fine except one nuisance is every time 'piactl connect' is completed, it's overwriting the /etc/resolv.conf with it's own values.. This isn't really atypical behavior in most VPN apps but what IS atypical is not having any kind of way I can find to set your own. in NordVPN etc you can always specify to use your DNS or not but I can't find a way to do it with PIA VPN. I run a Pi Hole here at home and want to direct all queries through it, instead of PIA. I can just edit /etc/resolv.conf and change it to 192.168.0.X and it works fine, but how do I stop that file from being overwritten by piactl?
Before I run it, it is correct, and says generated by NetworkManager in the comments. I want it to stay this way!
Thanks very Much!
Offline
chattr +i /etc/resolv.conf
will prevent changes to that file and shows up in https://wiki.archlinux.org/title/Privat … ng_PIA_DNS - though the discussed problem there looks different, you can protect the file against any changes this way.
Offline
Hi seth and thanks kindly for responding
I tried that command and unfortunately piactl refuses to do anythihng further once that file is locked! Unbelievable! It will not connect at all until it has the ability to forcefully overwrite my resolv.conf apparently. There is no error output anywhere but `journalctl -e` shows it's creating a bunch of devices for no reason, like up to 50 of them, all named wgpia0 but the device never stays up. As soon as i `chattr -i /etc/resolv.conf` within seconds the device goes up, traffic works fine, and of course, my DNS servers are once again wiped out.
It's crazy how determined this thing seems to be to use it's own DNS servers.. I want to use my own!
Offline
https://helpdesk.privateinternetaccess. … ers-in-app
Otherwise let's see
stat /etc/resolv.conf
As last resort you could inotifywatch the file and reset it after every change.
Offline
I had to install Xorg, and then use their GUI app to log in again and then inside the GUI app you can specify the DNS servers, as a comment in the AUR piavpn-bin had mentioned as a possibility
Hardly a good solution though - this machine is now super bloated and stuck running X server full time. It sounds like it's ONLY changeable inside their GUI app which is extremely frustrating and pointless as far as I can tell.. Thanks for your help!
I wouldn't mark this solved as it's not a good solution, and I'd love to hear from someone else if they figure out how to do this with just CLI tool
Last edited by genji (2023-09-04 19:44:02)
Offline
The GUI certainly writes some config?
You could strace it to locate that config file
Offline
In their support pia details manual connection scripts.
In the final section "ONE-LINE CALLS" they describe a one-liner to connect manually and it includes a variable "PIA_DNS=TRUE". I'd try that with "PIA_DNS=FALSE".
Offline