Context: I am building a private IPSEC site-site network between family homes. I have separate subnets in each home with local domain names for each. Host names are not working the way I want. I am starting to deploy many IoT devices. The goal is to not use any cloud services or apps and to blacklist garbage - Im building my own VPN and secure network under HA or some other developments I’m working on. Pihole for DNS namespace protection and control…
GOAL: I want take any host device and enter it’s MAC address and my desired host name for it in a single master authoritative data store that is available/stored to a (set of) DHCP/DNS servers. Regardless of where I attach it anywhere in the VPN (through DHCP relay or a pihole on that subnet) - server performs DORA, allocates a lease, creates a local DNS record, and then I want my applications to be able to immediately access it by FQDN based on the local domain and dynamic IP@ it gets wherever I attach to the network. Normal DHCP - get available next address for the given subnet/VLAN. I do NOT want to use discovery apps or other garbage. I do NOT want to manage DHCP static leases for each subnet. I do NOT want to manage static IP space per subnet. I DO want the solution to work with dynamic/changing addressing. I want this for devices that advertise a host name during DORA (ideally an option on DNS to override or keep) - or provide the name from the file for the devices that do not advertise a host name. I am done with a life of dealing with managing static leases, address spaces, and host files (yes I have corporate lab PTSD).
HELP:
I am new to pihole. Does anyone have a solution that takes a client MAC address that is used to bind DHCP lease and subsequently activate/create local DNS records using DHCP updated lease records? Conversely - remove local DNS record when DHCP lease expires or is released? Or provide some direction on how I can go about some code to achieve this in pihole? My thoughts are - trigger when lease file adds a record, trigger with lease file record being deleted → update local DNS with the IP@/hostname indexed by client MAC → propogate DNS change to backup pihole(s). I’m a pihole NOOB, so I hope I can get some pointers on (a) has anyone done this, or (b) pointers on how to do this in pihole….. before I start digging this (pi)hole….
thanks for any constructive feedback.
