问题 [root@station01 named]# host 192.168.0.2
Host 2.0.168.192.in-addr.arpa not found: 2(SERVFAIL)反向解析的出现错误,这时我们需要查看DNS日志,先看下/var/log/messages里
[root@station01 named]# tail /var/log/messages
Jan 21 11:12:25 station01 named[5262]: the working directory is not writable Jan 21 11:12:25 station01 named[5262]: zone 0.in-addr.arpa/IN/localhost_resolver: loaded serial 42 Jan 21 11:12:25 station01 named[5262]: zone 0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700 Jan 21 11:12:25 station01 named[5262]: zone 0.168.192.in-addr.arpa/IN/localhost_resolver: loading master file named.yutian: permission denied Jan 21 11:12:25 station01 named[5262]: zone 255.in-addr.arpa/IN/localhost_resolver: loaded serial 42 Jan 21 11:12:25 station01 named[5262]: 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.ip6.arpa/IN/localhost_resolver: loaded serial 1997022700 Jan 21 11:12:25 station01 named[5262]: zone yutian.com/IN/localhost_resolver: loaded serial 42 Jan 21 11:12:25 station01 named[5262]: zone localdomain/IN/localhost_resolver: loaded serial 42 Jan 21 11:12:25 station01 named[5262]: zone localhost/IN/localhost_resolver: loaded serial 42 Jan 21 11:12:25 station01 named[5262]: running 貌似没发现什么问题,这个默认是info级别的日志,在去查看下debug级别的日志[root@station01 data]# tail named.run
exiting zone 0.in-addr.arpa/IN/localhost_resolver: loaded serial 42 zone 0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700 zone 0.168.192.in-addr.arpa/IN/localhost_resolver: loading master file named.yutian: permission deniedzone 255.in-addr.arpa/IN/localhost_resolver: loaded serial 42 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.ip6.arpa/IN/localhost_resolver: loaded serial 1997022700 zone yutian.com/IN/localhost_resolver: loaded serial 42 zone localdomain/IN/localhost_resolver: loaded serial 42 zone localhost/IN/localhost_resolver: loaded serial 42 running 问题找到了,是权限的问题