我有一台装有 dnsmasq 2.75 的 Ubuntu 16.04 服务器,我正尝试设置它以使用 IPv6 服务器查询 DNS,但出现了超时。我在同一个网络上有一个 Windows 机器,它能够使用同一个 IPv6 服务器查询 DNS,没有任何问题。我检查了防火墙,我可以看到请求已发出,但服务器只是返回超时。
/etc/dnsmasq.conf
server=2001:4860:4860::8888
server=2001:4860:4860::8844
nslookup
administrator@server:~$ nslookup google.com
;; connection timed out; no servers could be reached
administrator@server:~$ nslookup google.com 2001:4860:4860::8888
;; connection timed out; no servers could be reached
挖
administrator@server-01:~$ dig google.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> google.com
;; global options: +cmd
;; connection timed out; no servers could be reached
administrator@server-01:~$ dig @2001:4860:4860::8888 google.com
; <<>> DiG 9.10.3-P4-Ubuntu <<>> @2001:4860:4860::8888 google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
笔记:Ubuntu 服务器具有 IPv6 连接,我能够在互联网上获取 IPv6 IP。
为了说明我可以访问 IPv6 服务器,这里有示例:
平
administrator@server-01:~$ ping6 2001:4860:4860::8888
PING 2001:4860:4860::8888(2001:4860:4860::8888) 56 data bytes
64 bytes from 2001:4860:4860::8888: icmp_seq=1 ttl=57 time=31.4 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=2 ttl=57 time=33.5 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=3 ttl=57 time=34.7 ms
64 bytes from 2001:4860:4860::8888: icmp_seq=4 ttl=57 time=32.9 ms
^C
--- 2001:4860:4860::8888 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 31.411/33.142/34.708/1.210 ms
Http 请求
目的地:ipv6.google.com (2607:f8b0:4000:804::200e)
administrator@server-01:~$ wget http://[2607:f8b0:4000:804::200e]/
--2017-10-24 08:26:03-- http://[2607:f8b0:4000:804::200e]/
Connecting to [2607:f8b0:4000:804::200e]:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-24 08:26:03 ERROR 404: Not Found.