I have OpenVPN Server,
whenever new client appears, I am running a script which should append the IP of the client, name in say local.list.
then I am sending realtime signal 4 using below command
sudo pkill -SIGRTMIN+4 pihole-FTL
Is there a way to see if this executed, and resulting logs from pihole/ftl ?
If my intention is to see the client name rather than the IP address, is the signal I am sending right ? or should I send real time signal 3 sudo pkill -SIGRTMIN+3 pihole-FTL instead ?
I see alias-client only once in entire documentation without explanation, what is it?
There is no need to send any signals as FTL can use inotify to fully automatically monitor files specified inside a hostsdir.
Quoting man dnsmasq:
Read all the hosts files contained in the directory. New or changed files are read automatically and modified and deleted files have removed records automatically deleted.
My proposal is now to create a directory, e.g. /opt/openvpn/, add a file /opt/openvpn/hosts and append/remove from this list. Then create a new file, e.g. /etc/dnsmasq.d/99-custom-hosts.conf with content
and run pihole restartdns.
Whenever hosts are now added (or removed) from your new list, you will see log lines like
Mar 19 07:38:52 dnsmasq: inotify: /opt/openvpn/hosts new or modified
Mar 19 07:38:52 dnsmasq: read /opt/openvpn/hosts - 2 names
This comes not only at the benefit of not needing to send any signals but also with letting your DNS cache stay intact.