I'm using Pi-hole as an internal DNS server for my clients and I'm running resources on another server that are internally and externally available on the same domain name (split-brain DNS). I've created a /etc/dnsmasq.d/domain.tld.conf file containing my internal DNS records like:
server.domain.tld is also externally available with my internet IP. Half of the time, Pi-hole answers to the client with the internal 192.168.100.100 IP for server.domain.tld, but the other half requests are forwarded to the forwarder DNS servers and my internet IP is returned. Since my router by default doesn't accept hairpin routes, this obviously doesn't work alright.
I've tried to add server.domain.tld and domain.tld to 'Local DNS --> DNS Records' which kind of makes it better, but not completely. I've also limited Pi-hole to 127.0.0.1 as it's DNS server. Is there a way to somehow make Pi-hole/DNSmasq authoritative for the domain to that it doesn't passes requests for that particular domain to the forwarder DNS servers?