[SOLVED] Issue with Reverse Lookup on RHEL 5 when using BIND
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Issue with Reverse Lookup on RHEL 5 when using BIND
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 an error.
Please help me with this issue. Thanks in advance.
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;
[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]#
I edited the named.conf and removed the localhost_resolver view. After that i rebooted the server and started the named service. But again the same issue is coming up.
I renamed the reverse.zone and tried to start the named service but its throwing file not found error.
The reverse.zone file is getting read but it seems there is some issue with the scripting inside reverse.zone.
[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;
The reverse.zone file is getting read but it seems there is some issue with the scripting inside reverse.zone.
The zone file of the reverse zone looks fine, but maybe there is something that is not visible at a first place.
Anyway create a new zone file and copy/paste the following data:
Code:
$ORIGIN 10.1.100.in-addr.arpa.
$TTL 86400
@ IN SOA orarmanlab.anand.com. root.orarmanlab.anand.com. (
2013071901 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS orarmanlab.anand.com.
10 IN PTR orarmanlab.anand.com.
Created a New Reverse Zone File. Even i changed the IP from 10.100.1.10 to 10.100.1.121.
Quote:
[root@orarmanlab log]# cd /var/named/chroot/var/named
[root@orarmanlab named]# ls -lrt
total 96
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
-rw-r----- 1 root named 427 Jan 6 2009 named.zero
-rw-r----- 1 root named 426 Jan 6 2009 named.local
-rw-r----- 1 root named 424 Jan 6 2009 named.ip6.local
-rw-r----- 1 root named 1892 Jan 6 2009 named.ca
-rw-r----- 1 root named 427 Jan 6 2009 named.broadcast
-rw-r----- 1 root named 195 Jan 6 2009 localhost.zone
-rw-r----- 1 root named 198 Jan 6 2009 localdomain.zone
drwxrwx--- 2 named named 4096 Jul 14 20:50 data
-rw-r----- 1 root named 258 Jul 19 07:20 forward.zone
-rw-r----- 1 root named 502 Jul 19 07:20 old_reverse.zone -rw-r--r-- 1 root named 253 Jul 22 07:13 reverse.zone
[root@orarmanlab named]# more reverse.zone
$ORIGIN 10.1.100.in-addr.arpa.
$TTL 86400
@ IN SOA orarmanlab.anand.com. root.orarmanlab.anand.com. (
2013071901 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS orarmanlab.anand.com.
121 IN PTR orarmanlab.anand.com.
[root@orarmanlab named]#
Quote:
[root@orarmanlab ~]# service named status
number of zones: 6
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is OFF
recursive clients: 0/1000
tcp clients: 0/100
server is up and running
named (pid 3559) is running...
It seems i did a mistake while putting the IP in reverse during the zone file configuration.Reversed IP available in the current zone files are completely wrong. Realized it now only. Will change it once at home and re check. Hope that will solve the issue.
It seems i did a mistake while putting the IP in reverse during the zone file configuration.Reversed IP available in the current zone files are completely wrong. Realized it now only. Will change it once at home and re check. Hope that will solve the issue.
Oops you're right. I've missed that one!
You should also leave at least a blank space at the beginning of the NS RR line. That's why I told you to copy/paste the zone file above.
Oops you're right. I've missed that one!
You should also leave at least a blank space at the beginning of the NS RR line. That's why I told you to copy/paste the zone file above.
Now its working. The way i put the reverse IP in Zone files was the issue. But with this mistake i learnt a lot about BIND. Thanks for your help and time. Really appreciated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.