Recently my DNS settings stopped working. They are the same settings I've had for a while now, and I don't know what has changed. Now each time I restart my system, I have no internet connection, getting a "This site can't be reached" Error from my browser, and the contents of /etc/resolv.conf are reset to :

# Generated by NetworkManager

The automatically generated file does not leave me with a working configuration, even when I delete the below DNS addresses from the 'DNS Servers' field. I had to write a script to update resolv.conf on each restart, which is OK, and works, but it's not ideal, since I don't like not understanding what the problem really is.

I get that my immediate problem is the resolv.conf file is being reset each boot, and I don't know how to stop that. I don't get why it only just started happening, and I don't get why my internet no longer works without the new DNS servers being present in resolv.conf.. as that wasn't an issue before, it seemed to just default to the DNS of my ISP, but this is no longer the case it would seem.

Current settings:

enter image description here

  • using some VPN software in Linux? Feb 9, 2018 at 23:02
  • 1
    does doing sudo rm /etc/resolv.conf ; sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.confsolve your problem? (confirm if you have a /run/resolvconf/resolv.conf file first) Feb 10, 2018 at 0:13
  • @RuiFRibeiro Why, yes it does! Thanks, if you fancy posting this as an answer I would gladly accept.
    – Totem
    Feb 10, 2018 at 0:23
  • @RuiFRibeiro As an aside, any idea what might have caused this issue?
    – Totem
    Feb 10, 2018 at 0:24
  • 1
    I am explaining it in the answer. Feb 10, 2018 at 0:24

1 Answer 1


Your DNS configuration is failing because when protonVPN is being activated, it is deleting your original /etc/resolv.conf symlink, and replacing it with a file of their own.

When it goes down, unfortunately, it does not recreate the symbolic link, and thus effectively creates a disconnect between the /etc/resolv.conf file and resolvconf/NetworkManager.

To correct this question, you have to run the following commands every single time after using (disconnecting) the VPN to restore the resolvconf symlink:

sudo rm /etc/resolv.conf
sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

I would also open a ticket with protonVPN, as this is a relatively known issue and a common occurrence with the software of some VPN providers.

Another possible (temporary) workaround for someone more familiar with Linux, is not being dependent on NetWorkManager and resolvconf, and dealing directly with the manual configuration of the interfaces.

  • This is why I asked wether a VPN was being used. Feb 10, 2018 at 0:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .