resolv.conf gets overwritten with bad nameserver on reboot (DNS_PROBE_FINISHED_BAD_CONFIG)

pk flag

Everytime I reboot my computer, resolv.conf gets:


placed into it.

When the nameserver is set to this ip, I am unable to ping or access any website (I get the error DNS_PROBE_FINISHED_BAD_CONFIG).

I have to manually change resolve.conf to:

nameserver, and then my dns lookup works as normal.

I have tried resetting resolv.conf as per the accepted suggestion here: DNS_PROBE_FINISHED_BAD_CONFIG error in Ubuntu 14.04 , but that didn't work.

The only way to access the internet is to manually override.

My question is:

How do I make resolv.conf work properly? I am initially manually overriding it because it became faulty at one point (it's unknown why, maybe it was a vpn config, update, or something else...)

ru flag

The issue isn't a 'wrong' server getting set, it's the fact that 18.04 and later use ResolveD by default now, similar to how 14.04 and older used dnsmasq to provide a DNS caching client. is added by systemd-resolved at reboot and startup. ResolveD gets its DNS configured by however you configured your Internet configuration on Netplan or Network Manager. If you haven't configured a DNS server properly in Netplan configuration then that's why ResolveD doesn't work, and if you don't get DNS servers via DHCP via either Netplan or Network Manager that's why it isn't working because it has no DNS servers to point to.

You can either fix your configuration (which you haven't shared so I can't be certain how you did the configuration of your system), or you can give ResolveD certain configuration options that act as backup configuration options for it by changing the configuration of /etc/systemd/resolved.conf.

Edit the file as superuser, uncomment the DNS= line by removing the # at the beginning of the line, and set it to DNS= Then do sudo systemctl restart systemd-resolved and test the DNS. It should then work and default to again for its queries, however resolv.conf will still look at which is normal behavior in modern Ubuntu systems. systemd-resolve --status will; show what DNS servers are being used from network options or Global options based on what it got from network configurations or from your entered config in /etc/systemd/resolved.conf.


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.