LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-01-2012, 12:46 AM   #1
anurajr
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
Unhappy bind dns configuration help


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/...l-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...
 
Old 01-01-2012, 07:40 AM   #2
fenice
Member
 
Registered: Apr 2006
Distribution: CentOS openSUSE
Posts: 47

Rep: Reputation: 4
You need to configure a reverse lookup zone in your DNS server: http://search.yahoo.com/search?p=%2B...UTF-8&fr=moz35
 
Old 01-01-2012, 08:06 AM   #3
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
For
nslookup anu.com
What is the IP of your system? Can you do nslookup like this?

Quote:
nslookup anu.com <your system IP>
 
Old 01-02-2012, 01:52 AM   #4
anurajr
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
@blue_print

i have tried that also.

[root@anu ~]# nslookup anu.com 192.168.1.2

Server: 192.168.1.2
Address: 192.168.1.2#53

** server can't find anu.com: NXDOMAIN
 
Old 01-02-2012, 06:22 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
follow the changes in RED colour
and don't forget to change the serial key when you make changes in any of your zone files

Quote:
Originally Posted by anurajr View Post
[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; 192.168.1.2; };
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

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

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

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

$TTL 1D
@ IN SOA @ anu.com. root.anu.com.(
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
IN NS anu.com.

anu IN A 192.168.1.2
AAAA ::1 <------remove this
A 127.0.0.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 NS 192.168.1.2
AAAA ::1 <------remove this
PTR localhost.
2 IN PTR anu.com.

make sure in your resolv.conf you mention this ip i.e 192.168.1.2

try this command and post the output
Code:
#dig -x 192.168.1.2
#dig anu.com

Last edited by deep27ak; 01-02-2012 at 06:24 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND IPv6 DNS Server Configuration austinium Linux - Server 3 07-17-2012 09:54 AM
bind dns configuration from source in centos 5.5 rath_pan Linux - Server 2 11-19-2011 12:37 AM
LXer: Linux DNS server BIND configuration LXer Syndicated Linux News 0 08-05-2010 11:30 PM
configuration DNS ,bind server Tomas12345 Linux - Newbie 1 06-29-2009 08:42 AM
DNS configuration with bind snipersock Linux - Networking 6 08-24-2004 04:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration