domain-name-system – PDNS服务器的正确设置过程是什么?

我是DNS服务器的新手,但作为我目前工作的一部分,我应该对我们的办公网络基础设施进行升级.

在查看可用选项后,我决定使用PowerDNS解决方案PDNS服务器.主要是因为通过MySQL后端轻松管理选项.

我已经运行了PDNS服务器,甚至可以满足我的需求,但是我看到旧BIND9和新PDNS的响应之间存在一些显着差异:缺少额外的部分,答案是“非授权”等.

基本上我们的DNS要求是:

>如果请求的域位于MysqL后端的记录中(例如intranet-domain.ourdomain.com),则响应应该是authorative.
>如果请求的域不在MysqL后端的记录中,则应将请求转发到外部网络以从适当的授权DNS获得答案.

我们目前的设置是:

> Debian 7
> pdns(标准仓库3.2)pdns-backend-MysqL poweradmin
> pdns-recursor(否则它不解析任何外部域名)

问题:

>我真的需要pdns-recursor才能使外部地址解析起作用吗?如果有办法将未知地址转发给ISP DNS,请赐教.
>如何使回复看起来更像BIND9?例如,我还想看到另外一节告诉我关于NS的请求地址等.
>此外,如果我将我们的DHCP PDNS作为主要而BIND9作为辅助,那么响应将始终来自BIND9而不是PDNS.虽然我将所有记录和区域从BIND9导入MysqL后端.怎么解决

pdns.conf:

allow-recursion=192.168.1.0/8,10.0.0.0/16,127.0.0.0/8 
allow-recursion-override=on 
config-dir=/etc/powerdns 
daemon=yes 
disable-axfr=yes 
guardian=yes 
lazy-recursion=yes 
local-address=192.168.1.5 
local-port=53 
master=yes 
module-dir=/usr/lib/powerdns 
recursor=127.0.0.1 
setgid=pdns 
setuid=pdns 
socket-dir=/var/run 
version-string=powerdns 
out-of-zone-additional-processing=yes 
include=/etc/powerdns/pdns.d

recursor.conf:

local-address=127.0.0.1
local-port=53
quiet=yes
setgid=pdns
setuid=pdns

pdns.local.gMysqL

launch=gMysqL
gMysqL-host=localhost
gMysqL-port=
gMysqL-dbname=pdns
gMysqL-user=pdns
gMysqL-password=pdns
gMysqL-dnssec=yes

解决方法

听起来您想要将递归解析器和权威名称服务器组合到一个服务器中.

By specifying the recursor option in the configuration file,questions
requiring recursive treatment will be handed over to the IP address
specified

http://doc.powerdns.com/html/recursion.html

文件继续陈述,N.B.:

Take care not to point recursor to the PowerDNS Authoritative Server
itself,which leads to a very tight packet loop!

看起来你已经设法通过将pdns-recursor放在127.0.0.1上来分离这两个.

您可以通过向服务器的IP发送dig或host命令进行测试,并观察DNS服务器的所有接口上的wireshark或tcpdump会发生什么.

关于权威旗帜,请参见问题3:

http://doc.powerdns.com/pdns-users-faq.html

根据评论编辑:

如果要使用另一个名称服务器作为recursor,请在pdns.conf的recursor设置中进行设置.例如:

recursor: 8.8.8.8

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些