opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.22k stars 718 forks source link

Hosts across VLANS register into DHCP Dynamic DNS PowerDNS Zone #7132

Closed JoshBlades closed 2 months ago

JoshBlades commented 8 months ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

Say we have 2 vlans: LAN & IOT, and the LAN DHCP pool is configured to use Dynamic DNS with PowerDNS, hosts from IOT DHCP pool are also populated into PowerDNS Zone. It would appear that once the config is set on one DHCP Dynamic DNS config, it applied to all DHCP pools.

To Reproduce

Steps to reproduce the behavior:

  1. Create 2 VLANS with seperate DHCP pools and CIDR ranges, for example: LAN & IOT.
  2. Configure the LAN DHCP pool to use Dynamic DNS with example PowerDNS.
  3. Ensure "Enable registration of DHCP client names in DNS." is checked.
  4. In the LAN DHCP pool, create a static host with a random hostname & CIDR range.
  5. In the IOT DHCP pool, create a static host with a different random hostname & CIDR range.

Expected behavior

Only the record for the static host which was created in step 4 to be added into the DNS Zone configured in step 2. Not both.

Additional context

Within /var/dhcpd/etc/dhcpd.conf it lists:

key dhcp-key {
  algorithm hmac-md5;
  secret XXXXXXXXXXXXXXXXX;
}

zone my.internal.domain. {
  primary 192.168.3.3;
  key dhcp-key;
}

This doesn't seem to be scoped to a specific vlan / interface.

Environment

Software version used and hardware type if relevant, e.g.:

OPNsense 23.7.11 (amd64). Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz

AdSchellevis commented 8 months ago

isc-dhcp is eol, so we try to limit our efforts on that subject. I would expect the ddns-domainname option (https://kb.isc.org/docs/isc-dhcp-41-manual-pages-dhcpdconf) glues the zone to the pool, which give you a direction on where to look.

OPNsense-bot commented 2 months ago

This issue has been automatically timed-out (after 180 days of inactivity).

For more information about the policies for this repository, please read https://github.com/opnsense/core/blob/master/CONTRIBUTING.md for further details.

If someone wants to step up and work on this issue, just let us know, so we can reopen the issue and assign an owner to it.