RHEL5 --DNS 配置出现 no current owner name 错误

xiaoxiao2021-03-01  34

原文地址:http://blog.chinaunix.net/uid-24332402-id-4507222.html

RHEL5.5x64 -- DNS方式配置SCAN以下操作在DNS服务器上进行: 安装bind三个包# rpm -ivh bind-9.3.6-4.P1.el5_4.2.x86_64.rpm# rpm -ivh bind-chroot-9.3.6-4.P1.el5_4.2.x86_64.rpm# rpm -ivh caching-nameserver-9.3.6-4.P1.el5_4.2.x86_64.rpm 配置主区域# cd /var/named/chroot/etc# cp -p named.caching-nameserver.conf named.conf# vi named.conf  options {         listen-on port 53 { any; };         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     { any; };         allow-query-cache { any; }; }; logging {         channel default_debug {                 file "data/named.run";                 severity dynamic;         }; }; view localhost_resolver {         match-clients      { any; };         match-destinations { any; };          recursion yes;         include "/etc/named.zones"; };  # cp -p named.rfc1912.zones named.zones  # vi named.zones zone "cn.test.com" IN {         type master;         file "cn.test.com.zone";         allow-update { none; }; };  zone "122.168.192.in-addr.arpa" IN {         type master;         file "122.168.192.local";         allow-update { none; }; }; # cd /var/named/chroot/var/named# cp -p named.zero cn.test.com.zone# cp -p named.local 122.168.192.local # vi cn.test.com.zone $TTL    86400 @       IN  SOA  dns.cn.test.com. root.cn.test.com. (                                         42              ; serial (d. adams)                                         3H              ; refresh                                         15M             ; retry                                         1W              ; expiry                                         1D )            ; minimum         IN      NS      dns.cn.test.com. scan   IN      A       192.168.122.195 scan   IN      A       192.168.122.196 scan   IN      A       192.168.122.197   # vi 122.168.192.local $TTL    86400 @       IN      SOA     dns.cn.test.com. root.cn.test.com.  (                                       1997022700 ; Serial                                       28800      ; Refresh                                       14400      ; Retry                                       3600000    ; Expire                                       86400 )    ; Minimum         IN      NS      dns.cn.test.com. 195     IN      PTR     scan.cn.test.com. 196     IN      PTR     scan.cn.test.com. 197     IN      PTR     scan.cn.test.com.   ### 启动后出现下面的错误[root@localhost etc]# service named restartStopping named:                                            [  OK  ]Starting named: Error in named configuration:cn.test.com.zone:1: no current owner namecn.test.com.zone:2: no current owner namecn.test.com.zone:8: no current owner namecn.test.com.zone:9: no current owner namecn.test.com.zone:10: no current owner namecn.test.com.zone:11: no current owner namezone cn.test.com/IN: loading master file cn.test.com.zone: no ownerlocalhost_resolver/cn.test.com/IN: no owner122.168.192.local:1: no current owner name122.168.192.local:2: no current owner name122.168.192.local:8: no current owner name122.168.192.local:9: no current owner name122.168.192.local:10: no current owner name122.168.192.local:11: no current owner namezone 122.168.192.in-addr.arpa/IN: loading master file 122.168.192.local: no ownerlocalhost_resolver/122.168.192.in-addr.arpa/IN: no owner                                                           [FAILED]  [root@localhost named]# service named startStarting named: Error in named configuration:cn.test.com.zone:9: unknown RR type 'scan'cn.test.com.zone:10: unknown RR type 'scan'cn.test.com.zone:11: unknown RR type 'scan'zone cn.test.com/IN: loading master file cn.test.com.zone: unknown class/typelocalhost_resolver/cn.test.com/IN: unknown class/type122.168.192.local:10: TTL set to prior TTL (195)122.168.192.local:11: TTL set to prior TTL (195)zone 122.168.192.in-addr.arpa/IN: loaded serial 1997022700                                                           [FAILED][root@localhost named]#最后发现在 cn.test.com.zone , 122.168.192.local 两个配置文件中 :# vi cn.test.com.zone $TTL    86400 @       IN  SOA  dns.cn.test.com. root.cn.test.com. (                                         42              ; serial (d. adams)                                         3H              ; refresh                                         15M             ; retry                                         1W              ; expiry                                         1D )            ; minimum         IN      NS      dns.cn.test.com. scan   IN      A       192.168.122.195 scan   IN      A       192.168.122.196 scan   IN      A       192.168.122.197   # vi 122.168.192.local $TTL    86400 @       IN      SOA     dns.cn.test.com. root.cn.test.com.  (                                       1997022700 ; Serial                                       28800      ; Refresh                                       14400      ; Retry                                       3600000    ; Expire                                       86400 )    ; Minimum         IN      NS      dns.cn.test.com. 195     IN      PTR     scan.cn.test.com. 196     IN      PTR     scan.cn.test.com. 197     IN      PTR     scan.cn.test.com.   文件内容的每行开头都会有个空格 ,因为配置的时候都是在网上找些前辈的的案例直接copy 上去 ,却都没有注意到 空格或是TAB 字符,去掉后一切正常 :[root@localhost named]# service named startStarting named:                                            [  OK  ][root@localhost named]# nslookup scan.cn.test.comServer:        192.168.122.94Address:    192.168.122.94#53Name:    scan.cn.test.comAddress: 192.168.122.195Name:    scan.cn.test.comAddress: 192.168.122.196Name:    scan.cn.test.comAddress: 192.168.122.197

转载请注明原文地址: https://www.6miu.com/read-3350164.html

最新回复(0)