未绑定服务器不响应由未绑定客户端 API 发出的 dns 查询

Dra*_*onX 1 linux dns unboundid-ldap-sdk

我正在尝试测试 dnsmasq 和未绑定服务器。当我从机器“Y”执行 getaddrinfo() 请求时,我从 dnsmasq 服务器机器“X”获得 dns 查询响应。但是,当我通过关闭 dnsmasq 并在机器“X”上启动未绑定服务器从“Y”未绑定客户端的 API发送 dns 查询时,我看不到任何 dns 响应/解析。

我已经从源代码安装了未绑定的服务器,并解决了它对“X”上的 RHEL5 的依赖关系。

我在机器“X”上启动未绑定的服务器:

未绑定-c /usr/local/etc/unbound/unbound.conf

并且可以正常启动,没有任何错误。

unbound.conf 的配置是:

server:
        verbosity: 1
## Specify the interface address to listen on:
        interface: xxx.xxx.xxx.xxx
## To listen on all interfaces use:
#       interface: 0.0.0.0
        do-ip4: yes
        do-ip6: yes
        do-udp: yes
        do-tcp: yes
        do-daemonize: yes
        access-control: 0.0.0.0/0 allow
## Other access control examples
#access-control: 192.168.1.0/24 action
## 'action' should be replaced by any one of:
#deny (drop message)
#refuse (sends  a  DNS  rcode REFUSED error message back)
#allow (recursive ok)
#allow_snoop (recursive and nonrecursive ok).
## Minimum lifetime of cache entries in seconds.  Default is 0.
#cache-min-ttl: 60
## Maximum lifetime of cached entries. Default is 86400 seconds (1  day).
#cache-max-ttl: 172800
## enable to not answer id.server and hostname.bind queries.
        hide-identity: yes
## enable to not answer version.server and version.bind queries.
        hide-version: yes
## default is to use syslog, which will log to /var/log/messages.
use-syslog: yes
## to log elsewhere, set 'use-syslog' to 'no' and set the log file location below:
#logfile: /var/log/unbound
python:
remote-control:
        control-enable: no
## Stub zones are like forward zones (see below) but must only contain authority server (no recursive servers)
#stub-zone:
#        name: "my.test.com"
## Note for forward zones, the destination servers must be able to handle recursion to other DNS server
## Forward all *.example.com queries to the server at 192.168.1.1
#forward-zone:
#        name: "example.com"
#        forward-addr: 192.168.1.1
## Forward all other queries to the Verizon DNS servers
forward-zone:
        name: "."
## Level3 Verizon
        forward-addr: 4.2.2.1
        forward-addr: 4.2.2.4
Run Code Online (Sandbox Code Playgroud)

请告诉我,如果我在某个地方出错,还想知道 dnsmasq 服务器是否实现线程/分叉子进程来处理查询,我们可以在 /etc/dnsmasq.conf 中设置相同的内容吗?

Dra*_*onX 6

必须在unbound.conf中添加配置:

access-control: <IP of client machine>/8 allow_snoop
Run Code Online (Sandbox Code Playgroud)