我在VirtualBox上设置了一个额外的静态IP,以测试DNS服务器。
但是当我尝试对其进行测试时,出现以下问题:
dig cali.
返回SERVFAIL。
dig @localhost cali.
返回正确的记录。
我可能做错了什么?
绑定文件:
/etc/bind/named.conf.local
zone "cali" {
type master;
file "/etc/bind/db.cali";
};
/etc/bind/named.conf.options
options {
directory "/var/cache/bind";
// 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. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
8.8.8.8;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
//allow-query { any; };
/etc/bind/db.cali
;
; BIND reverse data file for empty rfc1918 zone
;
$TTL 86400
@ IN SOA ns1 admin.cali. (
91 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS ns1
ns1 IN A 10.0.2.16