Are there any special file names required?
How can I check if the config file is loaded by FTL?
Pihole uses
/etc/dnsmasq.d/01-pihole.conf
/etc/dnsmasq.d/02-pihole-dhcp.conf
/etc/dnsmasq.d/04-pihole-static-dhcp.conf"
They filenames have the pattern [0-9,0-9]-name.conf
The pattern is specified in /etc/dnsmasq.conf
Anything *.conf
will work, I have seen posts by developers suggesting something like 99-something.conf
There isn't much you can do to check (you could add an invalid setting to see if it fails), otherwise, you can trust that all files in this directory, ending in .conf
will be read.
Any file extension will be recognized, not just ".conf". Be careful that old files are not stored in the /etc/dnsmasq.d directory, because even with an extension like ".old" or ".bak", they will still be read by dnsmasq and used.
This command will check the configuration syntax:
pihole-FTL dnsmasq-test
I have another use case here, which could justify at least a second row of input fields for the two IP protocols.
Ah, yes, sorry. I still have this in my ToDo list but too many real-life things have been pushing things back. I will move this higher on my ToDo list now...
Work-in-progress
Note that this is not yet functional as the underlying settings saving still needs to be adjusted for this (needs a core change).
If you are updating the GUI, may I suggest this. The Conditional Forwarding help text notes "One solution for this is to configure Pi-hole to forward these requests to your DHCP server." Could you expand on "these requests" in the help text please? What are "these requests" in this context exactly. It may be obvious to some, but not so to those new to Pi-hole.
would i be able to use conditional forwarding in the conf file to define 2 domain controllers?
i.e.
server=mydomain.com/192.168.100.2
server=mydomain.com/192.168.100.3
Yes, it even says this in the dnsmasq man page:
More than one --server flag is allowed, with repeated domain or ipaddr parts as required.
That said, your syntax is missing the leading forward slash after your equal signs. Yours should be:
server=/mydomain.com/192.168.100.2
server=/mydomain.com/192.168.100.3
Yes, second this as well! Maybe as a compromise, so there would be no extra bloat on the Web GUI, there could be a "+" button which adds a new text entry field for a conditional forwarder. Or... show/hide normal/expert menu items in settings, that a lot of other products do it that way.
did this feature ever come to be ? cannot see anything in the GUI for it. if i have to make the conf i will.
Not yet. DL6ER unassigned himself from this, so there is currently no one working on his I guess.
Necropostning here, sorry for that.
Any news on the subject?
So my question is if I'm doing it right without the GUI implementation?
root@ap-dietpi:/etc/dnsmasq.d# cat 99-myforwarders.conf
rev-server=172.30.30.0/24,172.30.30.21
server=/in.other01.com/172.30.30.21
server=/in.other01.com/172.30.30.22
rev-server=172.20.50.0/24,172.20.50.21
server=/in.other02.com/172.20.50.21
rev-server=172.20.40.0/24,172.20.40.12
server=/other03.com/172.20.40.12
rev-server=172.18.185.0/24,172.18.185.10
server=/other04.com/172.18.185.10
The option rev-server is that equivalent to .in-addr.arpa.?
rev-server=172.30.30.0/24,172.30.30.21
do the same as
server=/30.30.172.in-addr.arpa/172.30.30.21
Brgs,
--
rev-server=<ip-address>/<prefix-len>[,<ipaddr>][#<port>][@<interface>][@<source-ip>[#<port>]]
This is functionally the same as --server, but provides some syntactic sugar to make specifying address-to-name queries easier. For example --rev-server=1.2.3.0/24,192.168.0.1 is exactly equivalent to --server=/3.2.1.in-addr.arpa/192.168.0.1
https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
Your configuration looks valid.
Unfortunately not.
Thank you very much!
Some google-fu would probably gotten me the answer, but I'm grateful for your answer and apologies for taking your time. Some time one stumble and ask before doing a search.
As you quoted from the man, it's was very clear that it was "same-same"
GUI part: Not hard to setup through editing conf-files, but would be a "nice to have" if available through pi-hole settings.
Brgs,
Has the GUI version of this ever gone anywhere? I’m about to try to set this up using config files, and I’m a bit concerned about breaking something…. Thank you to all who support the project!
The GUI version has not been implemented in Pi-hole v5. The pull request was closed with
This will be address in v6.0 where the settings page is re-implemented (almost) from scratch.
Currently, we are working on v6.