Dynamic DNS and DHCP

Started by fromageblue, September 17, 2020, 05:49:05 PM

Previous topic - Next topic
I have a setup with a DHCPv4 service for a subnet with 2 pools which was done with the WebUI.
To make this explanation simple, I post below the subnet configuration directly from /var/dhcpd/etc/dhcpd.conf

As you can see, I have a config for a Dynamic DNS update (ddns-domainname) on the second pool, but it never updates my DNS zone. The client does get an IP within the specified range.
If I make the configuration on the first pool, that works. However, I need the 2 pools to update different DNS zones.

Is having a different dynamic zone to update on the second pool from the first pool valid ?
The OPNsense UI allows it, but it doesn't seem to work.

Quotesubnet 10.2.64.0 netmask 255.255.248.0 {
  pool {
    option domain-name-servers 10.2.0.100,10.2.0.101;
    deny members of "A6AAA4";
    ddns-update-style interim;
    range 10.2.65.1 10.2.71.250;
  }

  pool {
    option domain-name-servers 10.2.0.100,10.2.0.101;
    allow members of "A6AAA4";
    option domain-name "qa.activia.io";
    ddns-domainname "qa.activia.io";
    ddns-update-style interim;
    option netbios-name-servers 10.2.0.100;
    option netbios-node-type 8;
    range 10.2.71.251 10.2.71.254;
  }

  option routers 10.2.64.1;
  option domain-search "qa.activia.io","activia.io";
  option domain-name-servers 10.2.0.100,10.2.0.101;
  option ntp-servers 10.2.0.100,10.2.0.101;

  next-server 10.2.1.107;
  filename "/pxelinux.0";
}

I found the issue. I noticed that the zone declaration for the domain in the additional pool doesn't get added to /var/dhcpd/etc/dhcpd.conf which is why it is not updating the correct zone on the DNS server. This seems to be a bug in the OPNsense WebUI as I was able to get this type of configuration working on a DHCPd service running on Linux.

Bug opened with  opnsense / core
DHCP - Dynamic DNS Registration - No zone for DNS domain of additional pool in dhcpd.conf #4356
https://github.com/opnsense/core/issues/4356