当我使用 Webmin/BIND 配置新域时,系统会要求我输入Master Server
。 Webmin 会自动用我的盒子的主机名填充此值。 但是,此主机名是虚构的,并且除了 Google 公共 DNS 8.8.8.8、8.8.4.4 之外,没有为该盒子定义任何 DNS。 因此,我认为我的问题是,当为每个新区域查找 NS 记录时,BIND 会失败,因为它无法解析 NS。 我如何在 BIND 中定义我的主机名以便它能够解析?
的结果dig @localhost emprod ns
[root@emx0 ~]# dig @localhost emprod ns
; <<>> DiG 9.7.3-P3-RedHat-9.7.3-8.P3.el6_2.2 <<>> @localhost emprod ns
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 33828
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;emprod. IN NS
;; AUTHORITY SECTION:
. 10800 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2012031300 1800 900 604800 86400
;; Query time: 6 msec
;; SERVER: ::1#53(::1)
;; WHEN: Tue Mar 13 10:04:09 2012
;; MSG SIZE rcvd: 99
更新了下面区域 emprod 的配置。
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query {
10.1.1.0/24;
192.168.10.0/24;
10.2.1.0/24;
};
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
forwarders {
8.8.8.8;
};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
zone "emprod" {
type master;
file "/var/named/emprod.hosts";
};
$ttl 38400
emprod. IN SOA emx0.emlocal. admin.emergingmed.com. (
1331589041
10800
3600
604800
38400 )
emprod. IN NS emx0.emlocal.