2

I don't understand why I get no answer from dig using local dns.

Here's my /etc/bind/db.myhome file :

$TTL    604800
@       IN      SOA     myhome. root.myhome. (
                             37         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.myhome.
@       IN      A       192.168.1.1
ns.myhome IN    A       192.168.221.128
host1.myhome IN A       192.168.1.60

Here's my /etc/bind/named.conf.local :

zone "myhome" {
        type master;
        file "/etc/bind/db.myhome";
};

zone "1.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.1.168.192";
};

I've incremented the serial, then did rndc reload.

If I then do dig @localhost myhome , I don't get an answer section.

What am I missing ?

Looking at ifconfig, 192.168.221.128 is my ip.

Looking at systemctl status bind9, I see this :

zone myhome/IN: not loaded due to errors.
zone localhost/IN: loaded serial 7
all zones loaded
running
zone 1.168.192.in-addr.arpa/IN: sending notifies (serial 6)
network unreachable resolving './DNSKEY/IN': 2001:503:ba3e::2:30#53
network unreachable resolving './NS/IN': 2001:503:ba3e::2:30#53
network unreachable resolving 'E.ROOT-SERVERS.NET/AAAA/IN': 2001:500:3::42#53
network unreachable resolving './DNSKEY/IN': 2001:500:3::42#53
network unreachable resolving './NS/IN': 2001:500:3::42#53
0

It was because of ".myhome" here :

ns.myhome     IN    A       192.168.221.128
host1.myhome  IN    A       192.168.1.60

It works this way :

ns      IN    A       192.168.221.128
host1   IN    A       192.168.1.60

The tutorial where I learned that had the ".myhome" and it worked, so I guess he removed the "myhome" before actually testing it.

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.