Bind9 的防火墙规则

Pol*_*len 6 iptables bind

cat /etc/bind/named.conf.options

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk.
Run Code Online (Sandbox Code Playgroud)

我没有找到任何有关名称服务器和我之间的防火墙应用的确切防火墙规则的信息。

kri*_*sFR 4

客户端从任何端口向 DNS 服务器端口发出标准 DNS 查询UDP/53

UDP/53然后,DNS 服务器从任意客户端端口应答:

Client:Any ---query--> DNSServer:UDP/53 --
                                          |
Client:Any <--answer-- DNSServer:UDP/53 -<
Run Code Online (Sandbox Code Playgroud)

作为示例,iptables客户端的规则如下所示:

iptables -A OUTPUT -d DNSServer -p udp -dport 53 -j ACCEPT
iptables -A INPUT -s DNSServer -p udp -sport 53 -j ACCEPT
Run Code Online (Sandbox Code Playgroud)

UDP基本上,除非查询/应答小于或等于 512 字节,否则DNS 查询都会使用。

如果 DNS 查询/响应超过 512 字节,则协议将切换到TCP/53. TCP仅当 DNS 服务器必须一起通信时才需要,axfr例如区域传输 ( )。