dig/nslookup can't connect but ping can
6,955
Problem solved: added dns=dnsmasq to /etc/NetworkManager/NetworkManager.conf
Related videos on Youtube
![KleinFourGroup](https://i.stack.imgur.com/mgHpK.png?s=256&g=1)
Author by
KleinFourGroup
Updated on September 18, 2022Comments
-
KleinFourGroup almost 2 years
I just updated to 17.04; it broke my VPN app. As I was testing things, I found dig and nslookup weren't able to connect:
<me@mycomp>:~$ dig google.com ; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com ;; global options: +cmd ;; connection timed out; no servers could be reached <me@mycomp>:~$ nslookup google.com ;; connection timed out; no servers could be reached
However, ping does
<me@mycomp>:~$ ping google.com PING google.com (172.217.9.238) 56(84) bytes of data. 64 bytes from lga34s11-in-f14.1e100.net (172.217.9.238): icmp_seq=1 ttl=54 time=21.8 ms 64 bytes from lga34s11-in-f14.1e100.net (172.217.9.238): icmp_seq=2 ttl=54 time=21.9 ms 64 bytes from lga34s11-in-f14.1e100.net (172.217.9.238): icmp_seq=3 ttl=54 time=21.8 ms 64 bytes from lga34s11-in-f14.1e100.net (172.217.9.238): icmp_seq=4 ttl=54 time=21.9 ms 64 bytes from lga34s11-in-f14.1e100.net (172.217.9.238): icmp_seq=5 ttl=54 time=21.9 ms ^C --- google.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4007ms rtt min/avg/max/mdev = 21.850/21.903/21.940/0.190 ms
Here is my
/etc/resolv.conf
:# Generated by NetworkManager search mit.edu nameserver 127.0.1.1
My understanding is the last line is set by dnsmasq, but that isn't in my
/etc/NetworkManager/NetworkManager.conf
:[main] plugins=ifupdown,keyfile [ifupdown] managed=false
Any idea what's going on/how I can fix dig and nslookup?