【发布时间】:2021-05-06 11:52:49
【问题描述】:
我正在将 bind9 设置为我们本地网络的 DNS 服务器。服务器对来自运行服务器的机器的 DNS 查询按预期工作,但不响应来自网络上其他机器的查询。在 DNS 服务器上运行 tcpdump,我看到来自其他机器的查询到达,但我在 bind9 日志中没有看到任何响应或任何指示错误的内容。任何有关此问题的可能来源或调试途径的建议都非常感谢!
详细说明:
在 Ubuntu 上运行 bind9。我的配置是:
options {
directory "/etc/bind";
listen-on port 53 {100.1.1.2; };
listen-on-v6 port 53 { none; };
allow-query { any; };
dnssec-validation no;
};
zone "mydomain.com" IN {
type master;
file "mydomain.com.db";
allow-update { none; };
};
zone "1.1.100.in-addr.arpa" {
type master;
file "revp.100.1.1";
};
区域文件是
$ORIGIN mydomain.com.
$TTL 5; 3600
@ IN SOA dns admin.mydomain.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
; DNS Servers
NS dns
; Machine Names
localhost IN A 127.0.0.1
dns IN A 100.1.1.2
bar IN A 100.1.1.10
baz IN A 100.1.1.11
以sudo named -c /etc/bind/named.conf -g -d100 开头的named。查看日志,它确实在侦听正确的 IP(我看到 listening on IPv4 interface enp6s0, 100.1.1.2#53)。在使用dig baz.mydomain.com @100.1.1.2 运行DNS 服务器的同一台机器上测试DNS 查找我得到了来自DNS 服务器的答案,在named 日志中有相应的条目。我还在sudo tcpdump -i lo -u port 53 中看到了 DNS 请求。
接下来,现在在 PC 栏上,我运行了 dig baz.mydomaain.com @100.1.1.2。此请求未从 DNS 服务器获得任何响应,并且我在 DNS 日志中看不到任何内容。查看 DNS 服务器上的 sudo tcpdump -u port 53,我看到来自 bar 的 DNS 请求但没有响应,因此这似乎不是防火墙问题。
对后续步骤有什么建议吗?
【问题讨论】:
标签: networking dns named bind9