I have a strange situation. Pinging by ip works fine, but by host name fails. My observations:

nslookup -type=ns google.com
;; connection timed out; no servers could be reached

In one window I called:

ping google.com
ping: unknown host google.com

and in the other window I had this:

sudo tcpdump -n -i eno1 |grep -A5 # this is my dns server
11:06:57.336938 IP > 61526+ A? google.com. (28)
11:06:57.337151 IP > 61526 1/0/0 A (44)
11:06:57.337170 IP > ICMP udp port 48852 unreachable, length 80

As you can see in the tcpdump there was a response from DNS server and google.com was properly resolved:

What's going on here? Can I somehow debug it more?

I know that when I restart my network it would work fine, because it happened few times earlier. This is only workaround and it doesn't resolve my isssue.

I am using ubuntu 16.04 (desktop).


  • Can you change your nameserver to in /etc/resolv.conf ? – ponsfrilus Apr 18 '18 at 12:08
  • Thanks guys for suggestions. I have disabled dnsmasq (so it caused change of /etc/resolv.conf) and now it looks it works. – dePablo Apr 20 '18 at 9:20

I looked into these issues: nameserver in resolv.conf won't go away! How do I fix DNS resolving which doesn't work after upgrading to Ubuntu 13.10 (Saucy) and made a trick with disabling line "dns=dnsmasq" in /etc/NetworkManager/NetworkManager.conf .

It looks this solves my issue.

| improve this answer | |

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