Prevent Pi-hole from resolving queries from localhost?


Can Pi-hole be setup so that it is not being used as a DNS resolver by localhost itself?
In other words, is it possible to not have Pi-hole take over DNS services for the machine it is running on and have DNS queries from localhost itself be sent to a different DNS server instead?
Or, can FTLDNS bet configured to ignore queries from localhost (and not put ‘nameserver’ in /etc/resolv.conf)?

I am asking because, in my case, running Pi-hole apparently interferes with Mono Apps running on the same machine
(and I could not get to the bottom of it, but it seems to be an issue with Mono itself, resulting in all Mono Apps unable to resolve hostnames - queries never even reach Pi-hole and do not show up in the logs - while the same hostnames are resolved just fine on the host itself).
Everything else seems to be working fine, so for some reason Mono does not seem to play along well with Pi-hole.

As a workaround, I’ve tried manually setting the DNS Servers to be used in /etc/network/interfaces and restarted, but as soon as Pi-hole runs it ‘takes over’; as soon as I stop pihole-FTL, the manually set DNS server are used (in in /etc/resolv.conf) and the Mono Apps do resolve hostnames again.
Starting Pi-hole up again and the Mono Apps fail.

Anyone got an idea how to prevent this as a workaround or maybe even solve the issue itself?
I figure I could install unbound to sit between Mono and Pi-hole, but wouldn’t I run into the same issues?


Create a new file in /etc/dnsmasq.d name 99-ipbinding.conf



Replace the 192.168.X.X with your pihole IP address.

Choose in the Pi-hole web interface in Settings - DNS for Listen on all interfaces, permit all origins

Ofcourse you have to restart pihole to activate.


Ah, that was the missing link, thank you!

May I feature-request this as an option for pihole-FTL.conf (the change of resolv.conf)?


Btw. (I tried this as well, thank you) a small glitch I noticed after I did this (no longer necessary) is the status on the admin page is reported as ‘DNS service not running’ as pihole checks for but not it’s only running on 192.168.X.X#53.

So I could put my static IPv4 in /usr/local/bin/pihole as well (statusFunc, line 261 right now), but it would be nicer to work with variables here in future versions (I understand all of this is considered a hack right now).


I have inbound running at and Pihole is happy with that.

/etc/resolv.conf is for the local apps and changing it is more difficult and is situated in the systemd / startup section.