未绑定的 DNS:无法通过 nslookup 列出域

未绑定的 DNS:无法通过 nslookup 列出域

我在 CentOS 服务器上配置了非绑定 DNS,并在其中设置了本地区域。并且我已关闭服务器上的防火墙。
在 Windows 上,我尝试使用 nslookup 命令来验证非绑定 DNS 中的 DNS 记录,但结果是:

C:\Windows\system32>nslookup
Default Server:  UnKnown
Address:  192.168.0.161

> ls example.com
[UnKnown]
*** Can't list domain example.com: Query refused
The DNS server refused to transfer the zone example.com to your computer. If this
is incorrect, check the zone transfer security settings for example.com on the DNS
server at IP address 192.168.0.161.
> ns.example.com
server:  ns.example.com
Address:  192.168.0.161

Name:    ns.example.com
Address:  192.168.0.161

服务器上unbound.conf内容:

server:
local-zone: "example.com." static
local-data: "example.com. 86400 IN SOA ns.example.com. root 1 1D 1H 1W 1H"
local-data: "ns.example.com. IN A 192.168.0.161"
local-data-ptr: "192.168.0.161 ns.example.com."
access-control: 0.0.0.0/0 allow
interface: 0.0.0.0

答案1

我不认为您的服务器配置为允许区域传输到您的 Windows 测试机器。该ls命令实际上是在请求区域传输。

如果可能的话(我不确定是否可能),请配置未绑定的服务器以允许区域传输到相关 IP。

同时,尝试正常的 A 类型记录查找,看看是否有效。

答案2

我认为最好先采用更短、更简单的配置方式。然后先看看是否可以在服务器上解析名称。

相关内容