48

I am running Ubuntu 14.04 LTS on my Dell M3800.

I am having problems connecting to the Internet.

I getDNS_PROBE_FINISHED_BAD_CONFIG in my browser when trying to navigate to any site, but I am able to navigate to any site by using its IP.

So, for example, I am able to navigate to google.com by using http://173.194.121.16. So I think somewhere my DNS settings got messed up.

Any pointer on resolving this issue is appreciated. Please, let me know if you need any more information.

2
  • Can you resolve google.com using nslookup google.com?
    – s3lph
    May 11, 2015 at 21:57
  • @the_Seppi nslookup for any server was not working. I tried that.
    – Amrish
    May 11, 2015 at 22:22

3 Answers 3

68

So I figured out what the problem was. When I ran the following command sudo resolvconf -u I got this error:

/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf`

I solved this error by deleting /etc/resolv.conf and recreating the symbolic link. You can do that using the following commands:

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

This resolved the DNS error I was getting.

for Ubuntu 20.04 and above, just

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
12
  • 2
    This worked, thanks! Can you provide a description of what this symbolic link is needed for?
    – jerome
    Oct 6, 2015 at 1:13
  • 1
    Wow! this was so simple! I used to boot into recovery environment and enable networking for so long!
    – udiboy1209
    Feb 23, 2016 at 17:13
  • Hi, I tried the command as above. Then I type "ping cnn.com". the return is "ping: unknown host cnn.com". I type "ping google.com", the return is sth as " 64 bytes from dfw06s48-in-f14.1e100.net (216.58.194.110): icmp_seq=10 ttl=53 time=31.7ms
    – user785099
    Jun 5, 2016 at 22:20
  • 1
    From what directory I should execute this command?
    – Permana
    Dec 15, 2016 at 0:16
  • 1
    @Permana you can execute this command from /etc directory
    – Amrish
    Dec 15, 2016 at 4:37
21
sudo dpkg-reconfigure resolvconf

Say yes to "prepare /etc/resolve.conf for dynamic updates?"

sudo reboot
3
  • It worked. What a stupid bug :-) Sep 19, 2018 at 18:53
  • I answered no to the mentioned question and did not rebooted, but my problem still got solved immediately by this command. (Ubuntu 19.10, Chromium 80.0.)
    – manatwork
    Mar 24, 2020 at 19:55
  • 2
    resolvconf is not installed May 12, 2020 at 2:51
0

I had this problem when using NordVPN and using openvpn via terminal. I resolved this problem by importing VPN configuration file to Ubuntu Network UI. You can go to Settings -> Network. There will be VPN section, press add and then import file. Choose one of the downloaded .ovpn files from NordVPN. Then when you try to connect it seems to automatically fix DNS issue for some reason. :)

Actually that's what I expected because sometimes UI solutions are more stable than running Terminal commands.

1
  • I'm not using VPN May 12, 2020 at 2:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.