LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Error on a simple intranet DNS configuration (https://www.linuxquestions.org/questions/linux-server-73/error-on-a-simple-intranet-dns-configuration-4175458090/)

didi167 04-14-2013 06:07 AM

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.

Shmiti 04-14-2013 07:01 AM

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

didi167 04-14-2013 07:29 AM

Hello Shmiti!
Thanks you for your quick reply! I'll try in now!

didi167 04-14-2013 02:43 PM

Super! It's works!!!
Thank you very much!


All times are GMT -5. The time now is 05:31 PM.