LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-14-2013, 06:07 AM   #1
didi167
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Rep: Reputation: 0
Error on a simple intranet DNS configuration


Hi everyone,
I am new to linux and am trying to configure a DNS server, but it has been 2 days that I can not do it despite having followed thousand and one tutorials on the net.
I am under CENTOS 6.
I installed the DNS server config and makes, and when I nslookup tests in the normal range, I have a good answer as you can see bellow :

Code:
[root@dcim didi167]# nslookup dcim.fan.def
Server:		192.168.32.200
Address:	192.168.32.200#53

Name:	dcim.fan.def
Address: 192.168.32.200

However when I do nslookup in the reverse zone I get an error "server can't find 200.32.168.192.in-addr.arpa.: NXDOMAIN", as you can see bellow :

Code:
[root@dcim didi167]# nslookup 192.168.32.200
Server:		192.168.32.200
Address:	192.168.32.200#53

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

So below I give you my config files:
My domain name is: fan.def
The name of my machine at the same time the dns is: dcim

The file /etc/sysconfig/network-scripts/ifcfg-eth0

Code:
DEVICE=eth0
TYPE=Ethernet
UUID=ca115d82-bbb5-4bd0-8716-bd9d1eb1e5d5
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO="static"
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
IPADDR=192.168.32.200
NETMASK=255.255.248.0
GATEWAY=192.168.32.200
DNS1=192.168.32.200
# DNS2=xxx.xxx.xxx.xxx
DOMAIN=fan.def

HWADDR=4C:72:B9:62:05:67
LAST_CONNECT=1365743310

The file /etc/hosts

Code:
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.32.200 dcim.fan.def

The file /etc/resolv.conf

Code:
search fan.def
domain fan.def
nameserver 127.0.0.1
nameserver 192.168.32.200

The file /etc/named.conf

Code:
//
// 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 { 192.168.32.200/21; 127.0.0.1; };
#	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     { any; };
	recursion yes;
	forwarders { 127.0.0.1; };
	dnssec-enable yes;
	dnssec-validation yes;
	dnssec-lookaside auto;

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

	managed-keys-directory "/var/named/dynamic";
};

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

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

zone "fan.def" IN {
	type master;
	file "/var/named/forward.zone";
	allow-update { none; };
};

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

zone "32.168.192.in-addr.arpa" IN {
	type master;
	file "/var/named/32.168.192.in-addr.arpa";
	allow-update { none; };
};

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

The file /var/named/forward.zone

Code:
$TTL 604800
@	IN SOA	dcim.fan.def. root.dcim.fan.def. (
					1	; serial
					1D	; refresh
					1H	; retry
					1W	; expire
					3H )	; minimum
	IN	NS	dcim.fan.def.
dcim	IN	A	192.168.32.200

The file /var/named/32.168.192.in-addr.arpa

Code:
@	IN SOA	dcim.fan.def. root.dcim.fan.def. (
					2	; serial
					1D	; refresh
					1H	; retry
					1W	; expire
					3H )	; minimum
	IN	NS	dcim.fan.def.	
5	IN	PTR	dcim.fan.def.
That's all.
Please help me with this! it's been 2 days that I'm working on it, it's making me go crazy! :-(

Thanks.
 
Old 04-14-2013, 07:01 AM   #2
Shmiti
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Rep: Reputation: Disabled
The answer is quite simple...

look at the error:
"server can't find 200.32.168.192.in-addr.arpa."

your reverse zone contains "5.32.168.192.in-addr.arpa" and not "200.32.168.192.in-addr.arpa."
Either add the line "200 IN PTR dcim.fan.def." to the reverse zone file (don't forget to increment the serial)
or configure it as DDNS server
 
Old 04-14-2013, 07:29 AM   #3
didi167
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Hello Shmiti!
Thanks you for your quick reply! I'll try in now!
 
Old 04-14-2013, 02:43 PM   #4
didi167
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Super! It's works!!!
Thank you very much!
 
  


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
VERY simple CMS needed for intranet ctobola Linux - Server 1 08-17-2011 06:28 PM
simple questions on intranet software captain_sensible Linux - Newbie 3 05-18-2010 04:56 AM
DNS for an intranet mahbouba Linux - Newbie 9 07-31-2009 05:28 PM
Simple access to intranet thru DNS dmode Linux - Software 5 12-10-2008 10:35 PM
Dns configuration error hrajabi Linux - Networking 7 08-17-2005 02:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:31 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
Open Source Consulting | Domain Registration