I have ISC-DCHP-Server and BIND9 running on Debian Stretch. I am trying to setup Dynamic DNS for my client computers, but I'm struggling with the reverse zone.

Currently, when computers request an address with DHCP, an entry is created in the forward lookup zone correctly. Then, it attempts to add the reverse zone entry - which it does, but very incorrectly. For example, 234.1.168.192.168.192.in-addr.arpa.

In my BIND config, I have the following:

zone "168.192.in-addr.arpa" {
        type master;
        notify no;
        file "/etc/bind/zones/168.192.in-addr.arpa";
        allow-update { key rndc-key; };
};

In my zone file, I have the following:

$ORIGIN .
$TTL 604800     ; 1 week
168.192.in-addr.arpa    IN SOA  ns.example.com. root.example.com. (
                                24         ; serial
                                604800     ; refresh (1 week)
                                86400      ; retry (1 day)
                                2419200    ; expire (4 weeks)
                                604800     ; minimum (1 week)
                                )

It is creating the incorrect zones ($ORIGIN 0.168.192.168.192.in-addr.arpa. for example). I'm confident this is the issue, but cannot find where.

In my DHCPd Config:

ddns-domainname "example.com.";
ddns-rev-domainname "168.192.in-addr.arpa.";
ddns-update-style interim;
ignore client-updates;
update-static-leases on;
use-host-decl-names on;
option domain-name "example.com.";
include "/etc/dhcp/rndc.key";
update-optimization off;
update-conflict-detection off;
key rndc-key {
        algorithm hmac-md5;
        secret "0CZA8H3zL8GxplPmX2MGdQ==";
};
zone example.com. {
        primary 192.168.0.1;
        key rndc-key;
}
zone 168.192.in-addr.arpa. {
        primary 192.168.0.1;
        key rndc-key;
}

The subnet is a /23. I can run nslookup against hostnames; I cannot run it against IP addresses.

In my DHCPd configuration file, I put the reverse zone as 168.192.in-addr.arpa, which is incorrect. It needs to simply be in-addr.arpa.

ddns-rev-domainname "in-addr.arpa.";

After changing that, and restarting the DHCP and BIND services, hostnames were registering correctly, along with their PTR records.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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