Michael & All,
I am offering a Proof Of Concept (POC) for a DHCP to DNS bridge. The POC below is written in bash and may not be fast enough for thousands of devices.
It uses the On Commit/Release/Expiry (CRE) already included into ISC DHCP. I believe these are known as EVENTS.
=== NOTE === REFERENCE: EVENTS - There are three kinds of events that can happen regarding a lease, and it is possible to declare statements that occur when any of these events happen. These events are the commit event, when the server has made a commitment of a certain lease to a client, the release event, when the client has released the server from its commitment, and the expiry event, when the commitment expires.
To declare a set of statements to execute when an event happens, you must use the on statement, followed by the name of the event, followed by a series of statements to execute when the event happens, enclosed in braces. ===
If I did this correctly is should simplify the bridge by eliminating some of the parsing though `/var/ipfire/dhcp/fixleases` and searching for new or expired leases.
If I understand CRE correctly, it should also simplify the separated Dynamic Leases and Fixed Leases. CRE seems to handle both FIXED and DYNAMIC. The downside (or upside depending on your point of view) is the elimination of the DHCP configuration "Remarks" appearing to unbound as client domain names. See DHCP configuration - Current fixed leases (at menu Network > DHCP Server)
This is not complete and it currently does not include the Hostname (static) items at `/etc/unbound/hosts.conf`
There are many extra lines included to help me test & debug (i.e., "logger"). Most to be removed.
If this helps, please offer ideas or corrections. If not, then I will be :-(
File = `/var/ipfire/dhcp/dhcpd.conf.local`
File = `dhcpEvent_v6.sh`
The bash script currently writes to `/etc/unbound/dhcp-leases2.conf` so I can compare it to `dhcp-leases.conf`. It does NOT provide any data to unbound (yet!)
Is this script helpful?
Jon
Inspiration link: https://jpmens.net/2011/07/06/execute-a-script-when-isc-dhcp-hands-out-a-new...
Reference Link: Still looking!! https://stackoverflow.com/questions/51550326/is-there-any-hook-for-finishing...