pia-foss / desktop

Private Internet Access - Desktop VPN Client for Windows/macOS/Linux
Other
263 stars 50 forks source link

Reconnecting with PIA makes Custom DNS go away. #42

Open gholmann16 opened 2 years ago

gholmann16 commented 2 years ago

Describe the bug When I reconnect with PIA vpn, my custom DNS goes away, and in its place is a classic local DNS request.

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings -> Network -> DNS -> Custom -> Primary 1.1.1.1 -> Secondary 8.8.8.8
  2. /etc/resolv.conf is updated correctly
        nameserver 1.1.1.1
        nameserver 8.8.8.8
  3. Disconnect and reconnect
  4. /etc/resolv.conf is now set to a bad setting, which does not allow connection to the internet.

         # Generated by dhcpnameserver 8.8.8.8
    
         # /etc/resolv.conf.head can replace this line
        nameserver 10.0.2.1
        # /etc/resolv.conf.tail can replace this line

Expected behavior It should maintain the resolv.conf

Observed on: OS: Linux Version: Arch Linux, Cinnamon DE

kp-miguel-galindo commented 1 year ago

Is this still happening? Cannot reproduce in general. Perhaps a race condition where your dhcp is rewriting /etc/resolv.conf after the VPN connects?

gholmann16 commented 1 year ago

It definitely was getting rewritten. I switched to using the "Use existing DNS option" and I just manually edit my resolv.conf, but obviously this is not a great solution.