我刚刚更新到 17.04;它破坏了我的 VPN 应用程序。当我测试时,我发现 dig 和 nslookup 无法连接:
<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
但是,ping 确实
<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
这是我的/etc/resolv.conf
:
# Generated by NetworkManager
search mit.edu
nameserver 127.0.1.1
我的理解是最后一行是由 dnsmasq 设置的,但这并不在我的/etc/NetworkManager/NetworkManager.conf
:
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=false
知道发生了什么事/如何修复 dig 和 nslookup 吗?
答案1
问题已解决:将 dns=dnsmasq 添加到/etc/NetworkManager/NetworkManager.conf