我确实需要一些帮助。我已经使用 Centos 6.10 设置了 DNS 服务器。当我测试服务器的地址时,出现错误。
这是我的配置。
#named.conf
cat /etc/named.conf
//
// named.conf
options {
listen-on port 53 { 127.0.0.1; 10.224.78.22; };
# 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 { localhost; 10.224.78.0/24; };
recursion yes;
empty-zones-enable yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
#named.rfc1912.zones
cat /etc/named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "global.cs" IN {
type master;
file "global.cs";
allow-update { 10.224.78.0/24; };
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "78.224.10.in-addr.arpa" IN {
type master;
file "db.78.224.10";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
#Zone directe
cat /var/named/global.cs
$TTL 3H
@ IN SOA serverdns.global.cs. root.serverdns.global.cs. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS serverdns.global.cs.
@ IN A 10.224.78.22
serverdns IN A 10.224.78.22
www IN CNAME serverdns.global.cs.
#Zone inverse
cat /var/named/db.78.224.10
$TTL 3H
@ IN SOA serverdns.global.cs. root.serverdns.global.cs. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS serverdns.global.cs.
@ IN PTR global.cs.
global.cs IN PTR 10.224.78.22
6 IN PTR serverdns.global.cs.
nslookup serverdns
Server: 10.224.78.22
Address: 10.224.78.22#53
Name: serverdns.global.cs
Address: 10.224.78.22
nslookup 10.224.78.22
Server: 10.224.78.22
Address: 10.224.78.22#53
*** Can't find 22.78.224.10.in-addr.arpa.: No answer