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

BIND recursive not resolving some domains

· 52CE 我爱测

I have a recursive caching BIND/named setup and it does not want to resolve some domains. I see those errors in logfile: Dec 22 11:53:02 router2.lan named[301]: skipping nameserver 'ns0.flowerfire.com' because it is a CNAME, whil…

问题原文

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

I have a recursive caching BIND/named setup and it does not want to resolve some domains. I see those errors in logfile:

Dec 22 11:53:02 router2.lan named[301]: skipping nameserver 'ns0.flowerfire.com' because it is a CNAME, while resolving 'www.sawmill.net/AAAA'
Dec 22 11:53:02 router2.lan named[301]: SERVFAIL unexpected RCODE resolving 'www.sawmill.net/A/IN': 63.249.66.124#53
Dec 22 11:53:02 router2.lan named[301]: skipping nameserver 'ns0.flowerfire.com' because it is a CNAME, while resolving 'www.sawmill.net/A'
Dec 22 11:53:02 router2.lan named[301]: skipping nameserver 'ns1.flowerfire.com' because it is a CNAME, while resolving 'www.sawmill.net/A'
Dec 22 11:53:02 router2.lan named[301]: SERVFAIL unexpected RCODE resolving 'www.sawmill.net/AAAA/IN': 63.249.66.124#53
Dec 22 11:53:02 router2.lan named[301]: skipping nameserver 'ns0.flowerfire.com' because it is a CNAME, while resolving 'www.sawmill.net/AAAA'
Dec 22 11:53:02 router2.lan named[301]: skipping nameserver 'ns1.flowerfire.com' because it is a CNAME, while resolving 'www.sawmill.net/AAAA'

(that domain is not mine)
Google's 8.8.8.8 resolves this domain properly

Here's my named.conf

options {
    directory "/var/named";
    pid-file "/run/named/named.pid";

    listen-on-v6 { any; };

    dnssec-validation auto;
    auth-nxdomain no;
    allow-query {
        any;
    };

    recursion yes;
    allow-recursion {
        any;
    };
    allow-transfer { none; };
    allow-update { none; };


    version none;
    hostname none;
    server-id none;

    max-cache-size 16M;
    max-ncache-ttl 3600;
};

And BIND version:
BIND 9.11.0-P1

Does anyone know why is that happening?

By the way, the server is firewalled so no harm in allowing recursion from all sources.

已采纳解答

原帖链接 · Andrew B · CC BY-SA 3.0

The key to the problem is these two messages:

Dec 22 11:53:02 router2.lan named[301]: skipping nameserver 'ns0.flowerfire.com' because it is a CNAME, while resolving 'www.sawmill.net/A'
Dec 22 11:53:02 router2.lan named[301]: skipping nameserver 'ns1.flowerfire.com' because it is a CNAME, while resolving 'www.sawmill.net/A'

BIND is very strict about enforcing the RFC 1034 stipulation that NS records "should always" point at a primary name and not an alias. Some nameserver software may choose to work around the brain damage, but they should be considered the exception and not the rule.

BIND will initially chase the glue records served up by the net. TLD, but when it's time to refresh the NS records they will be evicted from cache when the CNAME is encountered.


As a side note, these sawmill.net nameservers are terrible in general. NS records pointing at CNAME aliases, NS records that are missing from the glue, four NS records which duplicate IPs and only really point at two, one nameserver returning an unexpected rcode, and adjacent IP addresses which ignore BCP 16. Sheesh.

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

资料来源与适用范围

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

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

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