I don't want to use
restartdns, as it takes to long for dns resolution to become available again. I'm using the dnsmasq
hostdir= syntax, as soon as a new IPv6 / hostname is entered in the additional hosts file, because it doesn't require any action, you just see (immediately) the following messages in the log file:
Aug 2 22:49:56 dnsmasq: inotify, new or changed file /etc/pfsense/neighbour
Aug 2 22:49:56 dnsmasq: read /etc/pfsense/neighbour - 17 addresses
When using this, there is no service interruption, read the dnsmasq man for more info. nslookup and / or dig commands, executed on any workstation immediately show the correct result.
I have a 4 port router, running pfsense. This is the only device, that knows it all, other devices on the LAN ports, including pihole, only know limited (to the physical network) information, when requesting arp (
arp -a) or neighbours (
In order to get all the IPv6 info, I remotely execute the command
ndp -na from the pi on the router (
ssh), on regular intervals (cron). The script, running the remote command, than processes the output, creating a new hostsfile entry (automatically picked up by the original dnsmasq code, embedded in pihole_FTL) and a client entry (sqlite3 command). To activate the client entry, the
reload-lists command is used (no noticeable service interruption).
The output (
ndp -a) looks like this (IP addresses changed):
2a02:1810:4d02:xxxx:c5a5:yyyy:79e1:zzzz b8:27:xx:yy:38:c7 igb2 23h59m58s S
2a02:1810:4d02:xxxx:20e:yyyyy:fecf:zzzz 00:0e:xx:yy:f3:cf igb2 permanent R
fe80::20e:c4ff:fecf:f3ce%igb1 00:0e:c4:xx:yy:ce igb1 permanent R
and contains both the IPv6 address and the MAC address. Using a static list (MAC / hostname), it's fairly easy to make the correct hosts and client entries.
As a result, all necessary info is available for pihole-FTL, unfortunately, only the long-term data visualizes the data immediately, the query log and the dashboard require additional time, before the IP address is replaced with the hostnames.