Hi Everyone,

I Am trying to configure DNS (Using BIND) on RHEL 5 test machine. I configured all the necessary files for the same. When i try to resolve the hostname its working with out any issues. But when i try the reverse lookup using the IP address its giving as error.

Please help me with this issue. Thanks in advance.

[root@orarmanlab named]# nslookup 10.100.1.10
Server: 10.100.1.10
Address: 10.100.1.10#53

** server can't find 10.1.100.10.in-addr.arpa: SERVFAIL


[root@orarmanlab named]#

[root@orarmanlab named]# dig -x 10.100.1.10

; <<>> DiG 9.3.4-P1 <<>> -x 10.100.1.10
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 35536
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;10.1.100.10.in-addr.arpa. IN PTR

;; Query time: 26 msec
;; SERVER: 10.100.1.10#53(10.100.1.10)
;; WHEN: Wed Jul 17 20:59:19 2013
;; MSG SIZE rcvd: 42



[root@orarmanlab named]# nslookup orarmanlab.anand.com
Server: 10.100.1.10
Address: 10.100.1.10#53

Name: orarmanlab.anand.com
Address: 10.100.1.10


[root@orarmanlab named]# nslookup orarmanlab
Server: 10.100.1.10
Address: 10.100.1.10#53

Name: orarmanlab.anand.com
Address: 10.100.1.10

[root@orarmanlab named]# dig orarmanlab.anand.com

; <<>> DiG 9.3.4-P1 <<>> orarmanlab.anand.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13152
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;orarmanlab.anand.com. IN A

;; ANSWER SECTION:
orarmanlab.anand.com. 86400 IN A 10.100.1.10

;; AUTHORITY SECTION:
anand.com. 86400 IN NS orarmanlab.anand.com.

;; Query time: 1 msec
;; SERVER: 10.100.1.10#53(10.100.1.10)
;; WHEN: Wed Jul 17 20:59:10 2013
;; MSG SIZE rcvd: 68

DNS FILES

[root@orarmanlab named]# more reverse.zone
$ORIGIN 10.1.100.in-addr.arpa.
$TTL 86400
@ IN SOA orarmanlab.anand.com. root.orarmanlab.anand.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS orarmanlab.anand.com.
10 IN PTR orarmanlab.anand.com.
[root@orarmanlab named]#


[root@orarmanlab named]# more forward.zone
$TTL 86400
@ IN SOA orarmanlab.anand.com. root.orarmanlab.anand.com. (

42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS orarmanlab.anand.com.
orarmanlab IN A 10.100.1.10

[root@orarmanlab named]#

[root@orarmanlab etc]# more named.conf
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver 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.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { 10.100.1.10; };
# 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";

// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;

allow-query { any; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { 10.100.1.10; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
[root@orarmanlab etc]#



[root@orarmanlab etc]# more 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
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};

zone "anand.com" IN {
type master;
file "forward.zone";
allow-update { none; };
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "10.1.100.in-addr.arpa" IN {
type master;
file "reverse.zone";
allow-update { none; };
};

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 {
type master;
file "named.ip6.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
[root@orarmanlab etc]#

[root@orarmanlab etc]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
10.100.1.10 orarmanlab.anand.com orarmanlab
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
[root@orarmanlab etc]#



[root@orarmanlab etc]# more /etc/resolv.conf
domain anand.com
nameserver 10.100.1.10
[root@orarmanlab etc]#

[root@orarmanlab etc]# more /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=orarmanlab.anand.com
[root@orarmanlab etc]#