The first script did not place A & PTR records into the unbound cache and this version does!
Once again I am looking for your feedback, thoughts and comments!
Jon
===============================================================================
NOTE: Do not place this into a Production environment - only for Test environment.
Description of Proof of Concept ———————————————————————————————
Transfers DHCP lease information to unbound DNS
• Enable DHCP On Commit/Release/Expire via dhcpd.conf (or dhcpd.conf.local) • A new (or changed or removed) dynamic/fixed lease causes Script to run • Script adds A & PTR records on Commit: • to unbound dhcp-leases.conf file • to unbound cache via "unbound-control load-data" • Script removes A & PTR records on Release or Expiry of lease
The Script ———————————
• Handles dynamic and fixed leases • Static hosts checked for duplicates • Re-enabled unbound-control local_data • unbound reloads not needed • A & PTR records survive IPFire reboot, unbound restart • no delays from difficult dhcp-leases parsing
Not completed (yet): • Static hosts still need to be parsed into unbound hosts.conf file • Properly handle hostnames with spaces • non-legit need to change to dashes or be removed (or completely dropped) • to be checked with large amount of clients • I’ve tested with 6 devices on test system and ~40 devices on production
NOTE: Do not place this into a Production environment. Only for Test environment.
• If placed into Test environment this current script will terminate "unbound-dhcp-leases-bridge". • Do not run the `dhcpEvent.sh` script and "unbound-dhcp-leases-bridge" in parallel.