DNS 缓存服务器

DNS 缓存服务器

在我的 Fedora 机器上,我尝试通过在 /etc/named.conf 中添加以下内容来使用在 VM 上运行的 AD dns 服务器:

zone "ad.test" {
      type stub;
      masters { 192.168.12.10; };
};

但呼吁

host xxx.ad.test 127.0.0.1

将返回

Host xxx.ad.test not found: 3(NXDOMAIN)

但是如果我添加以下内容而不是上面的内容:

zone "ad.test" {
     type forward;
     forwarders { 192.168.12.10; };
};

一切似乎都正常。

非常感谢您的帮助。

命名配置文件

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     { localhost; };                                                                                                               

        forwarders { 8.8.8.8; };                                                                                                                      

        recursion yes;                                                                                                                                

        dnssec-enable yes;                                                                                                                            
        dnssec-validation no;                                                                                                                         
        dnssec-lookaside auto;                                                                                                                        


        /* Path to ISC DLV key */                                                                                                                     
        bindkeys-file "/etc/named.iscdlv.key";                                                                                                        

        managed-keys-directory "/var/named/dynamic";                                                                                                  

        pid-file "/run/named/named.pid";                                                                                                              
};                                                                                                                                                    

logging {                                                                                                                                             
        channel default_debug {                                                                                                                       
                file "data/named.run";                                                                                                                
                severity notice;                                                                                                                      
                # severity dynamic;                                                                                                                   
        };                                                                                                                                            
}; 

zone "." IN {                                                                                                                                         
        type hint;                                                                                                                                    
        file "named.ca";                                                                                                                              
};                                                                                                                                                    

zone "ad.test" {                                                                                                                                     
      type stub;                                                                                                                                      
      masters { 192.168.12.10; };                                                                                                                     
};                                                                                                                                                   


include "/etc/named.rfc1912.zones";                                                                                                                   
include "/etc/named.root.key";   

重新启动服务后,以下内容写入系统日志。

Dec  8 11:30:48 bugly named[12498]: received control channel command 'stop'
Dec  8 11:30:48 bugly named[12498]: shutting down: flushing changes
Dec  8 11:30:48 bugly named[12498]: stopping command channel on 127.0.0.1#953
Dec  8 11:30:48 bugly named[12498]: stopping command channel on ::1#953
Dec  8 11:30:48 bugly named[12498]: no longer listening on 127.0.0.1#53
Dec  8 11:30:48 bugly named[12498]: no longer listening on ::1#53
Dec  8 11:30:48 bugly named[12498]: exiting
Dec  8 11:30:48 bugly systemd[1]: Stopping Berkeley Internet Name Domain (DNS)...
Dec  8 11:30:48 bugly systemd[1]: Starting Berkeley Internet Name Domain (DNS)...
Dec  8 11:30:48 bugly named[12547]: starting BIND 9.9.3-rl.13207.22-P2-RedHat-9.9.3-5.P2.fc19 -u named
Dec  8 11:30:48 bugly named[12547]: built with '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--disable-dependency-tracking' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-libtool' '--localstatedir=/var' '--enable-threads' '--enable-ipv6' '--with-pic' '--disable-static' '--disable-openssl-version-check' '--enable-exportlib' '--with-export-libdir=/usr/lib64' '--with-export-includedir=/usr/include' '--includedir=/usr/include/bind9' '--with-pkcs11=/usr/lib64/pkcs11/PKCS11_API.so' '--with-dlz-ldap=yes' '--with-dlz-postgres=yes' '--with-dlz-mysql=yes' '--with-dlz-filesystem=yes' '--with-dlz-bdb=yes' '--with-gssapi=yes' '--disable-isc-spnego' '--enable-fixed-rrset' '--with-docbook-xsl=/usr/share/sgml/docbook/xsl-stylesheets' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS= -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' 'LDFLAGS=-Wl,-z,relro ' 'CPPFLAGS= -DDIG_SIGCHASE'
Dec  8 11:30:48 bugly named[12547]: ----------------------------------------------------
Dec  8 11:30:48 bugly named[12547]: BIND 9 is maintained by Internet Systems Consortium,
Dec  8 11:30:48 bugly named[12547]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Dec  8 11:30:48 bugly named[12547]: corporation.  Support and training for BIND 9 are
Dec  8 11:30:48 bugly named[12547]: available at https://www.isc.org/support
Dec  8 11:30:48 bugly named[12547]: ----------------------------------------------------
Dec  8 11:30:48 bugly named[12547]: adjusted limit on open files from 4096 to 1048576
Dec  8 11:30:48 bugly named[12547]: found 4 CPUs, using 4 worker threads
Dec  8 11:30:48 bugly named[12547]: using 4 UDP listeners per interface
Dec  8 11:30:48 bugly named[12547]: using up to 4096 sockets
Dec  8 11:30:48 bugly named[12547]: loading configuration from '/etc/named.conf'
Dec  8 11:30:48 bugly named[12547]: reading built-in trusted keys from file '/etc/named.iscdlv.key'
Dec  8 11:30:48 bugly named[12547]: using default UDP/IPv4 port range: [1024, 65535]
Dec  8 11:30:48 bugly named[12547]: using default UDP/IPv6 port range: [1024, 65535]
Dec  8 11:30:48 bugly named[12547]: listening on IPv4 interface lo, 127.0.0.1#53
Dec  8 11:30:48 bugly named[12547]: listening on IPv6 interface lo, ::1#53
Dec  8 11:30:48 bugly named[12547]: generating session key for dynamic DNS
Dec  8 11:30:48 bugly named[12547]: sizing zone task pool based on 7 zones
Dec  8 11:30:48 bugly named[12547]: using built-in DLV key for view _default
Dec  8 11:30:48 bugly named[12547]: set up managed keys zone for view _default, file '/var/named/dynamic/managed-keys.bind'
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 10.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 16.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 17.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 18.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 19.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 20.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 21.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 22.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 23.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 24.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 25.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 26.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 27.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 28.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 29.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 30.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 31.172.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 168.192.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 64.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 65.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 66.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 67.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 68.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 69.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 70.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 71.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 72.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 73.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 74.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 75.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 76.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 77.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 78.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 79.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 80.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 81.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 82.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 83.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 84.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 85.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 86.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 87.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 88.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 89.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 90.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 91.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 92.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 93.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 94.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 95.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 96.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 97.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 98.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 99.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 100.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 101.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 102.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 103.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 104.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 105.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 106.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 107.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 108.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 109.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 110.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 111.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 112.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 113.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 114.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 115.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 116.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 117.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 118.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 119.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 120.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 121.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 122.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 123.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 124.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 125.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 126.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 127.100.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 127.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 254.169.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 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.0.IP6.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: D.F.IP6.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 8.E.F.IP6.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 9.E.F.IP6.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: A.E.F.IP6.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: B.E.F.IP6.ARPA
Dec  8 11:30:48 bugly named[12547]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Dec  8 11:30:48 bugly named[12547]: command channel listening on 127.0.0.1#953
Dec  8 11:30:48 bugly named[12547]: command channel listening on ::1#953
Dec  8 11:30:48 bugly named-checkconf[12544]: zone localhost.localdomain/IN: loaded serial 0
Dec  8 11:30:48 bugly named-checkconf[12544]: zone localhost/IN: loaded serial 0
Dec  8 11:30:48 bugly named-checkconf[12544]: 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: loaded serial 0
Dec  8 11:30:48 bugly named-checkconf[12544]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Dec  8 11:30:48 bugly named-checkconf[12544]: zone 0.in-addr.arpa/IN: loaded serial 0
Dec  8 11:30:48 bugly named[12547]: managed-keys-zone: loaded serial 15
Dec  8 11:30:48 bugly named[12547]: zone 0.in-addr.arpa/IN: loaded serial 0
Dec  8 11:30:48 bugly named[12547]: 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: loaded serial 0
Dec  8 11:30:48 bugly named[12547]: zone 1.0.0.127.in-addr.arpa/IN: loaded serial 0
Dec  8 11:30:48 bugly named[12547]: zone localhost/IN: loaded serial 0
Dec  8 11:30:48 bugly named[12547]: zone localhost.localdomain/IN: loaded serial 0
Dec  8 11:30:48 bugly named[12547]: all zones loaded
Dec  8 11:30:48 bugly named[12547]: running
Dec  8 11:30:48 bugly systemd[1]: Started Berkeley Internet Name Domain (DNS).

相关内容