我私有 DNS 上的一个域名出现了问题。我有两台服务器。
服务器 1 带有 dnsdist。它将端口 54 定向到服务器 2
带有 powerdns (端口 53) 和 powerdns-recursor (端口 54) 的服务器 2
我的配置运行良好。
域名服务器配置文件
allow-axfr-ips=X.X.X.X
also-notify=X.X.X.X
only-notify=X.X.X.X
daemon=yes
default-soa-content=ns1.example.eu1. admin.example.eu. 0 10800 3600 604800 3600
default-ttl=3600
disable-axfr=no
guardian=yes
include-dir=/etc/powerdns/pdns.d
launch=
local-address=X.X.X.X
local-port=53
log-dns-details=on
loglevel=4
master=yes
receiver-threads=2
setgid=pdns
setuid=pdns
slave=no
query-cache-ttl=60
递归器配置文件
dont-query=127.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10, 0.0.0.0/8, 192.0.0.0/24, 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 240.0.0.0/4, ::/96, ::ffff:0:0/96, 100::/64, 2001:db8::/32
allow-from=10.0.0.0/8, 127.0.0.0/8, 10.12.0.0/16, 10.13.0.0/16, 195.88.50.0/26, 10.66.0.0/16, 10.64.0.0/16
local-address=X.X.X.X
local-port=54
forward-zones=admin=X.X.X.X:53
max-negative-ttl=300
我从互联网上正确获取了记录。例如:
dig gmail.com TXT @X.X.X.X
; <<>> DiG 9.10.6 <<>> gmail.com TXT @X.X.X.X
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21866
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;gmail.com. IN TXT
;; ANSWER SECTION:
gmail.com. 103 IN TXT "globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8="
gmail.com. 103 IN TXT "v=spf1 redirect=_spf.google.com"
但我在一个域名上遇到了问题。更具体地说,是一条 TXT 记录。它正确地返回了 A、NS 记录。但没有返回 TXT。
dig domain.pl TXT @X.X.X.X
(此域名只是示例;))
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 47032
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;domain.pl. IN TXT
当我添加 8.8.8
dig domain.pl TXT @8.8.8.8
它得到正确的
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10134
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;domain.pl. IN TXT
;; ANSWER SECTION:
domain.pl. 3600 IN TXT "FHEdYvpM4TH6rmkf5U/YZ9I7VY6j3YftBJ1W7TVNh+ymbXU++rhkb1sXGnleSybC8NnUtP2ALk7/mAHE9LVgGg=="
而且这不是缓存。它被清理了。它只是每次都看不到 TXT 记录。
有人有主意吗?
在日志中,我看到:
Failed to resolve via any of the 2 offered NS at level
failed (res=-1)
答案1
好的,我找到了问题所在。现在它工作正常。在递归配置中我添加了dnssec=off