BIND and SERVFAIL

17,047

You use named-checkzone.

$ named-checkzone tenebris.cs cs.db 
dns_rdata_fromtext: cs.db:13: near 'hermes.tenebris.cs.': not a valid number
dns_master_load: cs.db:22: www.tenebris.cs: CNAME and other data
zone tenebris.cs/IN: loading from master file cs.db failed: not a valid number
zone tenebris.cs/IN: not loaded due to errors.

The first error tells you that you have a problem with your MX record pointing to hermes.tenebris.cs. MX records take the format:

name           ttl  class   rr  pref name

You are missing the pref. Since you have only one, you can set this to any valid number between 0 and 65535. I tried 10.

The next error is with your CNAME. A CNAME cannot coexist with another record. You have a duplicate with www pointing to both an A record as well as a CNAME.

Remove the A record and now your zone should work!

Share:
17,047

Related videos on Youtube

user2388250
Author by

user2388250

Updated on September 18, 2022

Comments

  • user2388250
    user2388250 over 1 year

    I know that this is a little outside the scope of this website, but I am trying to set up a test DNS server, and it absolutely refuses to resolve the local domains. I've tried following the advice of several tutorials and posts in various forums with no luck.

    Whenever I attempt to use dig or nslookup, the server responds with a generic SERVFAIL. Interestingly enough, the reverse lookups work just fine.

    I am sure it is a simple issue, but I am at wits end with trying to find it. Any help would be greatly appreciated.

    IP: 192.168.93.25

    Hostname: ns2.tenebris.cs

    Here are the files in question:

    /etc/resolv.conf

    nameserver 127.0.0.1
    search ns2.tenebris.cs
    

    /etc/bind/named.conf.local

    zone "tenebris.cs"{
        type master;
        file "/etc/bind/zones/tenebris.cs.db";
    };
    zone "93.168.192.in-addr.arpa"{
            type master;
            file "/etc/bind/zones/rev.93.168.192.in-addr.arpa";
    };
    

    /etc/bind/zones/tenebris.cs.db

    $TTL 86400      ; 1 day
    
    
    tenebris.cs.  IN  SOA ns2.tenebris.cs. hostmaster.example.com. (
    2008080901 ; serial
    8H ; refresh
    4H ; retry
    4W ; expire
    1D ; minimum
    )
    
           IN    NS  ns2.tenebris.cs.
           IN    MX  hermes.tenebris.cs.
           IN    A   192.168.93.25
    
    localhost IN A 127.0.0.1
    ns2     IN A    192.168.93.25
    www     IN A  192.168.93.250
    zeus    IN A  192.168.93.253
    hermes  IN A    192.168.93.250
    
    www     IN CNAME tenebris.cs.