2

Can't seem to get past a configuration error while configuring a simple DNS nameserver on Ubuntu 18.04 with Bind9.

named.conf.local file is pretty straigt-forward:

zone "mynameserver.local" {
        type master;
        file "/etc/bind/db.mynameserver.local";
        notify no;
};
zone "10.0.10.in-addr.arpa" {
        type master;
        file "/etc/bind/db.10.0.10.reverse";
        notify no;
};

My Forward File:

$TTL 3D
@       IN      SOA     ns1.mynameserver.local. dns1.mynameserver.local. (
                        20190228                ; serial (today's edit date)
                        8H                      ; refresh in seconds
                        2H                      ; retry in seconds
                        4W                      ; expire in seconds
                        1D)                     ; minimum in seconds
;
                NS      ns1                     ; Inet address of name server
ns1             A       10.0.10.235
gw              A       10.0.10.1               ; Network Gateway
                TXT     "Network Gateway"       ; Network Gateway
mail            A       10.0.10.245             ; Mail Gateway

Reverse:

$TTL 3D
@       IN      SOA     ns1.mynameserver.local. dns1.mynameserver.local. (
                        20180228                ; serial number
                        8H                      ; Refresh
                        2H                      ; Retry
                        4W                      ; Expire
                        1D)                     ; Minimum TTL
                NS      ns1.mynameserver.local

1               PTR     gw.mynameserver.local
245             PTR     mail.mynameserver.local
202             PTR     intergyserver.mynameserver.local

named-checkconf comes back clean.

named-checkzone ns1.mynameserver.local db.mynameserver.local comes back ok

named-checkzone 10.0.10.in-addr.arpa db.10.0.10.reverse errors with:

zone 10.0.10.in-addr.arpa/IN: NS 'ns1.mynameserver.local.10.0.10.in-addr.arpa' has no address records (A or AAAA)
zone 10.0.10.in-addr.arpa/IN: not loaded due to errors.

What is it that I am missing? Thanks!

2

Add a dot at the end of ns1.mynameserver.local (ns1.mynameserver.local.) in /etc/bind/db.10.0.10.reverse, wherever applicable.

With dot, the name is absolute. Without dot, the name is relative to the zone (ie. ns1.mynameserver.local.10.0.10.in-addr.arpa as your error message points out).

The complete config should look like that:

$TTL 3D
@       IN      SOA     ns1.mynameserver.local. dns1.mynameserver.local. (
                        20180228                ; serial number
                        8H                      ; Refresh
                        2H                      ; Retry
                        4W                      ; Expire
                        1D)                     ; Minimum TTL
                NS      ns1.mynameserver.local.

1               PTR     gw.mynameserver.local.
245             PTR     mail.mynameserver.local.
202             PTR     intergyserver.mynameserver.local.

Note that I have added dots after all PTR records too. Remember about this dot also when making CNAME records to external domains in forward zone, otherwise your record will point to something like external.com.mynameserver.local

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.