【发布时间】:2019-04-08 19:30:59
【问题描述】:
我以using this Docker image 为例,尝试通过 TLS 设置安全 DNS 转发到 CloudFlare 的解析器。我正在使用 CoreDNS 1.5.0(最新),我的配置是这样的:
# CoreDNS Configuration
.:53 {
forward . tls://1.1.1.1 tls://1.0.0.1 {
tls_servername tls.cloudflare-dns.com
policy sequential
health_check 5s
}
log
}
我提出这样的要求:
root@8ef125545369:/# dig @127.0.0.1 google.com
; <<>> DiG 9.11.3-1ubuntu1.5-Ubuntu <<>> @127.0.0.1 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 49802
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 090b0d7fadcdd8bb (echoed)
;; QUESTION SECTION:
;google.com. IN A
;; Query time: 24 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Apr 08 19:29:30 UTC 2019
;; MSG SIZE rcvd: 51
我没有得到答案。 CoreDNS 日志如下所示:
missioncontrol | 2019-04-08T19:29:30.778Z [INFO] 127.0.0.1:39615 - 49802 "A IN google.com. udp 51 false 4096" NOERROR - 0 5.02365452s
missioncontrol | 2019-04-08T19:29:35.759Z [INFO] 127.0.0.1:39615 - 49802 "A IN google.com. udp 51 false 4096" NOERROR - 0 5.00549558s
很明显,CoreDNS 正在接收请求,但我无法确定失败的原因。我的图像是ubuntu:bionic,并且安装了ca-certificates。我也可以使用openssl s_client 连接到1.1.1.1:443 而不会出现问题。
在设置从 CoreDNS 到 CloudFlare 解析器的 DNS-over-TLS 转发时,我是否缺少一些东西?
编辑
我已经在 Docker 容器外的主机操作系统上对此进行了测试,我看到了相同的功能,即它无法正常工作。
【问题讨论】: