- 利用 powerdns+mysql 做了权威 DNS 服务器;
- 权威(内部)DNS 的查询是没有问题的;
- 递归查询不定时歇菜,最早递归查询外网的域名是在 pdns.conf 里指定 recursor=223.5.5.5 的,后来为了解决这个问题,也看了官网的建议,所以在本机另外安装了 pdns-recursor,并监听本机的 5300 端口;
- 这样我修改 pdns.conf 里的 recursor=127.0.0.1:5300, 好了 2 天,但是今天下午又出现之前一样的问题,表象就是只能权威查询,不能递归查询外网的域名,无奈只能重启 pdns..
- 对外服务的是 10.28.70.100 这个虚拟 IP.
配置和报错:
pdns.conf
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=*********
gmysql-dbname=pdns
gmysql-password=*******
webserver=yes
webserver-address=127.0.0.1
webserver-allow-from=127.0.0.1
webserver-port=8081
api=yes
api-key=********
api-logfile=/var/log/pdns-api.log
config-dir=/etc/pdns
include-dir=/etc/pdns/pdns.d
guardian=yes
local-address=0.0.0.0
security-poll-suffix=
setgid=pdns
setuid=pdns
default-soa-name=ns1.***.com
default-soa-edit=INCEPTION-INCREMENT
default-soa-mail=hostmaster.***.com
default-ttl=600
daemon=yes
disable-axfr=no
distributor-threads=10
max-cache-entries=1000000
max-queue-length=5000
max-tcp-connections=10000
recursor=127.0.0.1:5300
allow-recursion=10.28.0.0/16
retrieval-threads=10
reuseport=yes
server-id=ns1.***.com
recursor.conf
setuid=pdns-recursor
setgid=pdns-recursor
forward-zones=.=223.5.5.5;114.114.114.114
local-address=0.0.0.0
local-port=5300
报错:
Apr 17 19:20:01 base3 pdns_server: Apr 17 19:20:01 Recursive query for remote 10.28.70.100:16733 with internal id 2 was not answered by backend within timeout, reusing id
Apr 17 19:20:04 base3 pdns_server: Apr 17 19:20:04 Recursive query for remote 10.28.80.11:49570 with internal id 3 was not answered by backend within timeout, reusing id
Apr 17 19:20:04 base3 pdns_server: Apr 17 19:20:04 Recursive query for remote 10.28.70.100:59774 with internal id 15 was not answered by backend within timeout, reusing id
Apr 17 19:20:06 base3 pdns_server: Apr 17 19:20:06 Recursive query for remote 10.28.43.11:27463 with internal id 4 was not answered by backend within timeout, reusing id