大网数据广告活动
服务器运维问答

Bind DNS Forwarder With Delegated Sub Domain

· 52CE 我爱测

I currently have my Bind DNS server set up to query from root servers and I have an Active Directory sub domain delegated in my DNS settings. My named.conf.options currently looks like this: acl internals { 172.16.0.0/12; 192.168…

问题原文

原帖链接 · Intrepid · CC BY-SA 3.0

I currently have my Bind DNS server set up to query from root servers and I have an Active Directory sub domain delegated in my DNS settings. My named.conf.options currently looks like this:

    acl internals { 172.16.0.0/12; 192.168.0.0/16; 127.0.0.1;};

options {
        directory "/var/cache/bind";



        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };

        allow-query { internals; };
        allow-recursion { internals; };
};

controls {
        inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};

And my AD subdomain is delegated like this:

directory      IN      NS      ds1.directory.domain.com.
ds1.directory.domain.com.    IN      A       192.168.0.60

Everything works great here, but I would like to set up DNS forwarders instead of using the root servers. I've added the following to my named.conf.options file:

forwarders {
      208.67.222.222;
      208.67.220.220;
};
forward only;
dnssec-enable yes;
dnssec-validation yes;

This also seems to work, but now my AD subdomain is not working. If I try to ping directory.domain.com, it tells me unknown host. Is there somethign special I have to do with delegated sub domains when forwarding DNS requests? I'm guessing the subdomain is getting forwarded to the external DNS server. How can I get it to resolve to my DNS server first?

Thanks!

已采纳解答

原帖链接 · Intrepid · CC BY-SA 3.0

I figured it out. I have to cancel the forwarders on my authoritative zone. Otherwise queries will be forwarded to my global forwarding rule. So my zone in named.conf.local looks like this:

    zone "domain.com" {
        type master;
        file "/var/lib/bind/db.domain.com";
        forwarders {};
};

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-09-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。