1

I'm trying to configure a DNS server in UBUNTU 12.04 with BIND9 service.I'm able to successfully configure the same and the when I'm executing nslookup command it works well.However,the host command seems to be not working which will execute the reverse address zone.

HOST COMMAND ERROR:

root@necacdnsone:/etc/bind/zones# host 10.222.190.54 Host 54.190.222.10.in-addr.arpa. not found: 3(NXDOMAIN)

Successful NSLOOKUP command output:

nslookup necone.com
Server:         10.222.190.54
Address:        10.222.190.54#53

Name:   necone.com
Address: 10.222.190.54

The configuration files are having entries as mentioned below.Kindly guide me to fix the reverse address zone issue.(host command)

named.conf.local

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";
zone "necone.com" {
 type master;
 file "/etc/bind/zones/db.necone.com";
};
zone "190.222.10.in-addr.arpa" {
  type master;
  file "/etc/bind/zones/db.10";
};

db.10 file

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     necacdnsone.necone.com. root.necone.com. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
        IN  NS  necacdnsone.
   1    IN  PTR gateway.necone.com.
   54   IN  PTR necacdnsone.necone.com.
   52   IN  PTR dhcpserver.necone.com.

db.necone.com

;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     necacdnsone.necone.com. root.necone.com. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
necone.com.      IN  NS  necacdnsone.necone.com.
necone.com.      IN  A   10.222.190.54
   ;@               IN  A   127.0.0.1
   ;@               IN  AAAA    ::1
necacdnsone       IN  A   10.222.190.54
gateway           IN  A   10.222.190.1
dhcpserver        IN  A   10.222.190.52
www       IN  CNAME   necone.com.

I think somewhere in the named.conf.local file i have made a mistake.

SYSLOGS

tail -f /var/log/syslog
Apr  7 19:38:50 necacdnsone named[4507]: error (network unreachable) resolving '62.191.222.10.in-addr.arpa/PTR/IN': 2001:dc3::35#53
Apr  7 19:38:50 necacdnsone named[4507]: error (network unreachable) resolving '62.191.222.10.in-addr.arpa/PTR/IN': 2001:7fd::1#53
Apr  7 20:08:32 necacdnsone named[4507]: error (connection refused) resolving './DNSKEY/IN': 10.222.190.1#53
Apr  7 20:08:35 necacdnsone named[4507]: error (network unreachable) resolving './DNSKEY/IN': 2001:7fe::53#53
Apr  7 20:08:42 necacdnsone named[4507]: error (network unreachable) resolving './DNSKEY/IN': 2001:500:3::42#53
Apr  7 20:08:42 necacdnsone named[4507]: error (network unreachable) resolving './DNSKEY/IN': 2001:503:ba3e::2:30#53
Apr  7 20:08:42 necacdnsone named[4507]: error (network unreachable) resolving './DNSKEY/IN': 2001:500:2f::f#53
Apr  7 20:08:42 necacdnsone named[4507]: error (network unreachable) resolving './DNSKEY/IN': 2001:500:1::803f:235#53
Apr  7 20:08:42 necacdnsone named[4507]: managed-keys-zone ./IN: Unable to fetch DNSKEY set '.': timed out
Renold
  • 33
  • 1
  • 4
  • Is the NS record in the db.10 zone really correct? It looks like it's not a FQDN. – faker Apr 07 '15 at 08:19
  • @faker I believe the NS record in the db.10 is correct.I have followed all the instructions provided in this given link.Kindly correct me if i have made any mistake[link]http://askubuntu.com/questions/330148/how-do-i-do-a-complete-bind9-dns-server-configuration-with-a-hostname – Renold Apr 07 '15 at 10:06

1 Answers1

4

The immediate cause of error is the leading whitespace in your db.10 file. Correct:

;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     necacdnsone.necone.com. root.necone.com. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
        IN  NS  necacdnsone.
1    IN  PTR gateway.necone.com.
54   IN  PTR necacdnsone.necone.com.
52   IN  PTR dhcpserver.necone.com.

Incorrect:

;
        IN  NS  necacdnsone.
   1    IN  PTR gateway.necone.com.
   54   IN  PTR necacdnsone.necone.com.
   52   IN  PTR dhcpserver.necone.com.
^^^ spaces are the problem

Do remember to increase SOA Serial and then to reload named.

In an unrelated matter, you should specify IN NS necacdnsone.necone.com. contrary to what your ill-chosen guide suggests.

kubanczyk
  • 13,502
  • 5
  • 40
  • 55
  • 1
    Mostly correct and well spotted +1, but to nitpick: the problem is the **leading** whitespace, not trailing whitespaces :) - A leading whitespace or TAB is Bind shorthand to indicate a repeat of the previous resource record's name. That makes each of the lines a repeat of the `@` record, creating round-robin PTR records with different TTL's of `1` , `54` , and `52` seconds. – HBruijn Apr 07 '15 at 11:36
  • 1
    Yup, I stand corrected :) – kubanczyk Apr 07 '15 at 14:02