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.
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.
So, I'm back online!
Hope this helps.
I was really helpful. Could you imagine i relied on a vpn for like a week.
ReplyDeleteThanks a lot for this working hint
ReplyDelete