Skip to main content

Ubuntu DNS issue fix DNS_PROBE_FINISHED_BAD_CONFIG

Issue 

I've been playing with a VPN and somehow it messed up my DNS resolution configurations. Chrome gives DNS_PROBE_FINISHED_BAD_CONFIG error and can't ping google. So it seemed to be an issue with the DNS. Of course, restarting didn't fix it.

I tried DNS lookup which gave me below.

error nslookup google.com

To make sure this is somehting to do with my DNS confgis, I ran the same by providing the google DNS servers. 

nslookup with google dns


It works, which means my default DNS is not working for some reason.

To make sure this, ran the below command.

systemd-resolve --status

Output has an entry for DNS Servers, which was ::1

Fix


1. Edit the file /etc/systemd/resolved.conf.

sudo vi /etc/systemd/resolved.conf

2. Add new DNS entries. I added 2 google DNS and the cloudflare DNS sever.
[Resolve]
DNS=8.8.8.8 8.8.4.4 1.1.1.1

3. Restart the systemd-resolved and check the configuration is persisted in /run/systemd/resolve/resolv.conf file.

sudo service systemd-resolved restart
cat /run/systemd/resolve/resolv.conf

Same contents you added should be there.

4. Delete the symlink to /etc/resolv.conf

sudo rm /etc/resolv.conf

5. Create a new symlink

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf

6. Restart the service agian

sudo service systemd-resolved restart

7. To check if this is working, run the nslookup with default name server.

Nslookup google.com


So, I'm back online!
Hope this helps.



Comments

  1. I was really helpful. Could you imagine i relied on a vpn for like a week.

    ReplyDelete
  2. Thanks a lot for this working hint

    ReplyDelete

Post a Comment