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.
我没有find任何有关在名称服务器和I之间使用防火墙的准确防火墙规则的信息。
客户端从任何端口到UDP/53 DNS服务器端口进行标准DNS查询。
然后,DNS服务器从UDP/53应答任何客户端端口:
Client:Any ---query--> DNSServer:UDP/53 -- | Client:Any <--answer-- DNSServer:UDP/53 -<
作为示例,Client的iptables规则如下所示:
iptables -A OUTPUT -d DNSServer -p udp -dport 53 -j ACCEPT iptables -A INPUT -s DNSServer -p udp -sport 53 -j ACCEPT
基本上,DNS查询使用UDP除非查询/回答less于或等于512字节。
如果DNS查询/响应超过512字节,则协议将切换到TCP/53 。 只有在DNS服务器必须一起说话的情况下,您才需要TCP ,以区域转移( axfr )作为示例。