0

In my home network under Ubuntu I use a BIND9 DNS server and an ISC DHCP server with Webmin.

Here are my settings:

DNS Master Zone:

Foward: home.local
Reverse: 192.168.5

/etc/bind/named.conf.local:

// Key
key "DHCP_UPDATER" {
 algorithm hmac-sha256;  
 secret "xxx";
};

// Forward DNS Zone
zone "home.local" {
 type master;
 file "/var/lib/bind/home.local.hosts";
 update-policy {
 grant DHCP_UPDATER zonesub any;
 };
};

// Reverse DNS Zone
zone "5.168.192.in-addr.arpa" {
 type master;
 file "/var/lib/bind/192.168.5.rev";
 update-policy {
 grant DHCP_UPDATER zonesub any;
 };
};

/etc/dhcp/dhcpd.conf:

ddns-updates on;
ddns-update-style standard;
allow unknown-clients;
allow client-updates;
ddns-rev-domainname "5.168.192.in-addr.arpa";
ddns-domainname "home.local";
option domain-search "home.local";
option subnet-mask 255.255.255.0;
authoritative;
default-lease-time 600;
max-lease-time 7200;

## Key
key "DHCP_UPDATER" {
 algorithm hmac-sha256;  
 secret "xxx";
}

## Forward DNS Zone
zone home.local. {
 primary 192.168.5.2;
 key DHCP_UPDATER;
}

## Reverse DNS Zone
zone 5.168.192.in-addr.arpa. {
 primary 192.168.5.2;
 key DHCP_UPDATER;
}


# HOME
subnet 192.168.5.0 netmask 255.255.255.0 {
 option domain-name "home.local";
 option domain-name-servers 192.168.5.2 , 8.8.8.8;
 option broadcast-address 192.168.5.255;
 option routers 192.168.5.1;
 range 192.168.5.130 192.168.5.199;
}

If I create a new DNS entry manually, everything is OK:

home.local (Forward):

nas.home.local.   A   3600   192.168.5.254

192.168.5 (Reverse):

254.5.168.192.in-addr.arpa.  PTR   3600   nas.home.local.

If it is created dynamically, then there is an error:

home.local (Forward):

raspi01.home.local.   A   300   192.168.5.140
raspi01.home.local.   DHCID  300   xxx

192.168.5 (Reverse): [HERE IS THE PROBLEM]

140.5.168.192.5.168.192.in-addr.arpa.   PTR   300   raspi01.home.local.

What did I do wrong?

2
  • 1
    This is probably not the cause of your problem but please note that .local is reserved for mDNS and should not be used as a private TLD (it will cause problems for devices that support mDNS and other aspects of IETF ZeroConf). For a private TLD, use .home.arpa or .test instead.
    – Spiff
    Commented Mar 2 at 19:17
  • In the meantime, we found the cause of the error. This entry needed to be corrected: ddns-rev-domainname "in-addr.arpa" Thanks!
    – Blasto
    Commented Mar 3 at 13:53

1 Answer 1

1

Your ddns-rev-domainname "5.168.192.in-addr.arpa" doesn't seem to be correct. It should be always set to "in-addr.arpa". (Notice how dhcpd always adds the full reversed IP address to the provided domain name – it does not try to guess or count; whatever domain you provided is literally just suffixed to the address.)

1
  • This was the cause of the problem! I corrected the entry 'ddns-rev-domainname "in-addr.arpa"', then restarted and it was fixed! Thank you!
    – Blasto
    Commented Mar 3 at 13:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .