0

Service named (DNS/Bind) is failing to start. What am I doing wrong? I think it has to do with my 155.100.198.in-addr.arpa file, but I can't see my error.

I am getting the following errors:

zone 155.100.198.in-addr.arpa/IN: has no NS records
zone 155.100.198.in-addr.arpa/IN: not loaded due to errors.
_default/155.100.198.in-addr.arpa/IN: bad zone

Running on Centos 6 using a Plesk control panel. The following files are in Director: /var/named/ Except for named.conf, which is under: /var/named/chroot/etc/

In my named.conf file my call to zones are:

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

    zone "155.100.198.in-addr.arpa" {
    type master;
    file "benmorgancreations.com.rr.zone";

    };

In file: benmorgancreations.com.zone:

$ORIGIN benmorgancreations.com. 
$TTL 86400 
@   IN  SOA dns1.benmorgancreations.com. webmaster.benmorgancreations.com. (
            2001062501 ; serial                     
            21600      ; refresh after 6 hours                     
            3600       ; retry after 1 hour                     
            604800     ; expire after 1 week                     
            86400 )    ; minimum TTL of 1 day


    IN  NS  ns1.benmorgancreations.com.       
    IN  NS  ns2.benmorgancreations.com.        


    IN  MX  10  mail.benmorgancreations.com.             


ns1 IN  A   198.100.155.226
ns2 IN  A   198.100.155.226
ftp IN  A   198.100.155.226
mail    IN  A   198.100.155.226
mail2   IN  A   198.100.155.226

In my benmorgancreations.com.rr.zone

$ORIGIN 155.100.198.in-addr.arpa. 
$TTL 86400

@   IN  SOA dns1.benmorgancreations.com.    webmaster.benmorgancreations.com. (

2001062501 ; serial                     
            21600      ; refresh after 6 hours                    
            3600       ; retry after 1 hour                     
            604800     ; expire after 1 week                     
            86400 )    ; minimum TTL of 1 day  

IN NS   ns1.benmorgancreations.com.       
IN NS   ns2.benmorgancreations.com.
226 IN  PTR    server1.benmorgancreations.com.
226 IN  PTR    server2.benmorgancreations.com.
226 IN  PTR    ftp.benmorgancreations.com.
226 IN  PTR    ftp.benmorgancreations.com.

And in my 155.100.198.in-addr-arpa file:

$TTL    86400 
@   IN  SOA benmorgancreations.com. webmaster.benmorgancreations.com.
(
            1441588071  ; Serial
            10800   ; Refresh
            3600    ; Retry
            604800  ; Expire
            10800   ; Minimum
            )


    IN  NS ns1.benmorgancreations.com.
    IN  NS ns2.benmorgancreations.com.
MadHatter
  • 78,442
  • 20
  • 178
  • 229

2 Answers2

2

Based on the config excerpt it's not clear that the file 155.100.198.in-addr.arpa (155.100.198.in-addr-arpa?) is used at all.

The zone 155.100.198.in-addr.arpa, however, has been set up to use the file benmorgancreations.com.rr.zone (a less than intuitive name) and that's where there appears to be a problem with the zone data.


As the error message implies, there are no NS records at the apex of your 155.100.198.in-addr.arpa zone.

The problem here would appear to be a difference in whitespace between this zone and your working examples.

Specifically:

 IN NS   ns1.benmorgancreations.com.

and

IN NS   ns1.benmorgancreations.com.

will mean entirely different things when parsed.


First example:

Owner name (mandatory field): [blank] (inherits the owner name from previous record, 155.100.198.in-addr.arpa.)
TTL (optional field): [not specified] (86400 based on $TTL)
Class (optional field): IN
Type (mandatory field): NS
Data (mandatory field): ns1.benmorgancreations.com.

155.100.198.in-addr.arpa. 86400 IN NS ns1.benmorgancreations.com.


Second example:

Owner name (mandatory field): IN
TTL (optional field): [not specified] (86400 based on $TTL)
Class (optional field): [not specified] (default class value IN)
Type (mandatory field): NS
Data (mandatory field): ns1.benmorgancreations.com.

IN.155.100.198.in-addr.arpa. 86400 IN NS ns1.benmorgancreations.com.

And, in the end what the error message is all about is that there are no NS records at 155.100.198.in-addr.arpa.


Then, leaving the interesting part of the question behind.
Is the 198.100.155.0/24 IP network actually all yours? Ie, will 155.100.198.in-addr.arpa actually be delegated to you so that people will query your nameservers for this zone?

Håkan Lindqvist
  • 33,741
  • 5
  • 65
  • 90
  • Thank you for the answer. Yes, the IP is mine, as it is on a VPN. I've never had to work with zone files before, so this was very new to me. The white space issue makes sense. Thanks again for looking at it and for the comments. – user1507506 Sep 09 '15 at 20:10
0

The problem is, as indicated, in your zonefile:

$ORIGIN 155.100.198.in-addr.arpa. 
$TTL 86400
@   IN  SOA dns1.benmorgancreations.com.    webmaster.benmorgancreations.com. (
2001062501 ; serial                     
            21600      ; refresh after 6 hours                    
            3600       ; retry after 1 hour                     
            604800     ; expire after 1 week                     
            86400 )    ; minimum TTL of 1 day  

IN NS   ns1.benmorgancreations.com.       
IN NS   ns2.benmorgancreations.com.

In DNS short-hand a line starting with a whitespace is a continuation of the previous record.
That white-space is missing from the IN NS records which is why those don't register as NS records (but as an incorrect resource record for a host called called 'IN').

Simple add the leading white spaces, or the @ shorthand for the zone ORIGIN.

@   IN NS   ns1.benmorgancreations.com.       
    IN NS   ns2.benmorgancreations.com. 
HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • In fairness, that might, or might not, be my fault. The original post was so badly marked up that I may have introduced that corruption when trying to set it properly. Really, the OP needs to come back, learn how to use the SE markup language, and properly insert his/her zonefiles. – MadHatter Sep 08 '15 at 09:26
  • That would be consistent with the error message though: `has no NS records` – HBruijn Sep 08 '15 at 09:28
  • 1
    Absolutely, I entirely agree. I just thought it worth noting that people *might* be proceeding on false information. Hopefully not. – MadHatter Sep 08 '15 at 09:29
  • Thanks HBruijn for the comment. I appreciate you taking the time and explaining the white space issue. – user1507506 Sep 09 '15 at 20:11
  • @MadHatter, I agree I don't know much about the markup language, which is why I posted it here. I appreciate you modifying my question to make it more readable. – user1507506 Sep 09 '15 at 20:13