November 25, 2024, 05:32:44 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: bind dns configuration not resolving correctly..help me..  (Read 11441 times)

Offline anurajr

  • New Member
  • Posts: 1
bind dns configuration not resolving correctly..help me..
« on: January 01, 2012, 07:49:26 AM »
I am new to linux. plz help me to sort out the problem. Recently i have installed centos 6. now i want to configure dns. but its not resolving correctly.

[root@anu ~]# rpm -qa | grep bind
bind-9.7.3-8.P3.el6_2.1.i686
rpcbind-0.2.0-8.el6.i686
samba-winbind-clients-3.5.4-68.el6.i686
ypbind-1.20.4-29.el6.i686
bind-devel-9.7.3-8.P3.el6_2.1.i686
bind-utils-9.7.3-8.P3.el6_2.1.i686
bind-libs-9.7.3-8.P3.el6_2.1.i686
bind-sdb-9.7.3-8.P3.el6_2.1.i686
bind-dyndb-ldap-0.2.0-7.el6.i686
PackageKit-device-rebind-0.5.8-13.el6.i686
bind-chroot-9.7.3-8.P3.el6_2.1.i686

[root@anu~]#vim /var/named/chroot/etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind 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.
//

options {
listen-on port 53 { 127.0.0.1; 192.168.1.2; };
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; };
recursion yes;

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

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

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

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

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

[root@anu~]#vim /var/named/chroot/etc/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
// and http://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

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

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

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


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

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

zone "2.1.168.192.in-addr.arpa" IN {
type master;
file "anur.loopback";
allow-update { none; };
};

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




[root@anu]# vim /var/named/chroot/var/named/anu.localhost

$TTL 1D
@ IN SOA @ anu.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
IN NS anu.com.
A 127.0.0.1
anu IN A 192.168.1.2
AAAA ::1

[root@anu]# vim /var/named/chroot/var/named/anur.loopback

$TTL 1D
@ IN SOA @ anu.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
anu.com. IN A 192.168.1.2
AAAA ::1
PTR localhost.
2 IN PTR anu.com.


[root@anu ~]# service named restart
Stopping named: . [ OK ]
Starting named: [ OK ]


[root@anu ~]# nslookup anu.com
Server: 192.168.1.1
Address: 192.168.1.1#53

Non-authoritative answer:
Name: anu.com
Address: 74.xx.xx.xx
Name: anu.com
Address: 216.xxx.xxx.xxx

[root@anu ~]# nslookup 192.168.1.2
Server: 192.168.1.1
Address: 192.168.1.1#53

** server can't find 2.1.168.192.in-addr.arpa.: NXDOMAIN


What should i do now??? Plz help me...

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Re: bind dns configuration not resolving correctly..help me..
« Reply #1 on: January 04, 2012, 08:13:54 AM »
Things to look at:

1. Make sure your /etc/resolv.conf on all Linux servers are pointing to your DNS server you just setup.

2. Always read /var/log/messages to make sure that your DNS server service started okay without error messages.