Does FTLDNS still obey all-servers?

Does FTLDNS still obey all-servers? I have added it to my setup (uses unbound and cloudflared) but cant see any change and the query log shows all are forwarded to cloudflared @DL6ER @davekr8

Yes.

Then that is the DNS server that's quickest to return an answer (edit: which would be the only one shown in Pi-hole's query log):

--all-servers

By default, when dnsmasq has more than one upstream server available, it will send queries to just one server. Setting this flag forces dnsmasq to send all queries to all available servers. The reply from the server which answers first will be returned to the original requester.

(qouted from dnsmasq documentation)

For me it works.
image
have you added it "on-top" of the 01-pihole.conf ?
I use a special config to do my personal tweaks. See
image

This is intended behavior because the Query Log also tries to be simple. The query is forwarded and the Query Log can only show the first server a query was sent to. This is typically the first one in your config file /etc/dnsmasq.d/01-pihole.conf

When you check /var/log/pihole.log, as suggested by @davekr8, you should see what is really going on.

Do you think we need to change this? It is still a custom (and, hence, maybe even an edge-case) configuration, I'd say, and changing the static datastructure to be able to hold multiple forward destinations would increase the overall memory footprint of Pi-hole. It'd likely not be dramatic but we're still talking about some 5-10%ish memory increase because every query needs to be able to store this extra information - even when they are not forwarded and these slots remain empty.

No I do not thing it needs to be changed (one thing could be - see below). I created the post after enabling all-servers because even if I switched Custom DNS 1 and 2 it always show the same resolver in the logs (the one it had previously favoured as the fastest - cloudflared) even if I used an address I knew unbound would have cached.

But entering the container sudo docker exec -it pihole /bin/bash and looking at the logs more /var/log/pihole.log shows the requests going to both upstream servers and responses coming in.

Jul  9 00:00:02 dnsmasq[1733]: forwarded ifconfig.co to 172.101.1.4
Jul  9 00:00:02 dnsmasq[1733]: forwarded ifconfig.co to 172.101.1.3
Jul  9 00:00:02 dnsmasq[1733]: reply ifconfig.co is 2606:4700:3036::ac43:85e4
Jul  9 00:00:02 dnsmasq[1733]: reply ifconfig.co is 2606:4700:3036::6815:1956

If one thing were to be changed:
It is not clear to me that the server PiHole logs is the fastest responding server - if it is not, this would be a desirable feature. Also as shown above the /var/logs/pihole.log does not show which server the response came from, so I cannot even see which server is the fastest responder.

Without wanting to be picky here, but why do you need to know this? If Pi-hole picks the fastest one, you can just let select the fastest among the ones you like to be used and benefit from knowing it always picks the fastest (instead of assuming that the fastest now will be the fastest tomorrow and next year, too).

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.