Hmm, based on our tests it seems not for every query, but the interface info needs to be somehow updated. E.g. if pihole-FTL starts before any network interface has been configured, no query is accepted (as local request) until dnsmasq update is triggered, which e.g. is done when opening the web UI or running pihole status
, although not 100% sure why/what exactly is the trigger .
Good point. However a firewall seems to be not the reason since only switching to "all interfaces from all origins" solves the issue.
It is a VPN server (?), hence starting it does not require DNS but the other way round, dnsmasq requires all interfaces to be configured to detect correctly local IPs. I just found @DanSchaper verifying this which verifies as well that dnsmasq does not re-estimates available interfaces on every query: Have to "pihole restartdns" after reboot - #15 by DanSchaper
I am pretty sure that the 255.255.255.255
WireGuard netmask is the issue here which marks the server IP itself as only member of the subnet, hence the only valid "local origin". But let's wait for OP reply.
wg0.conf
btw would need to contain Address = 10.0.40.6/24
for this while it currently seems to contain Address = 10.0.40.6/32
.