I've encountered this issue 3 times now, and it always happens after I reboot my debin server that I have pihole on docker installed on. I've removed/deleted config folder, and reinstalled a fresh instance of pihole 3 times.
After every reboot, I can see in the logs it states,
WARNING Misconfigured DNS in /etc/resolv.conf: Two DNS servers are recommended, 127.0.0.1 and any backup server, WARNING Misconfigured DNS in /etc/resolv.conf: Primary DNS should be 127.0.0.1 (found 127.0.0.11),
this is an environment variable, you're looking for the dns: [list] setting not environment: [list], the difference being DNS is for the container's resolv.conf wehre as the DNS env vars are for DNSMasq's upstream dns servers (e.g. dnsmasq service uses dns:, clients of dnsmasq will use the upstream servers from env)
I should have payed closer attention to the two things.
Thanks for the explanation. Two questions.
if I'm using dns: - 127.0.0.1 - 1.1.1.1
Is it ok to leave the DNS env vars since they're for DNSMasq? Or am I likely to run into some issues? I don't foresee any issues but asking just incase.
About to research this one, is there a way in pihole to exclude specific IP addresses from having any content blocked? My wife works from home and I don't want to mistakenly block something she needs to use for work. My guess is this is something I'd have to do on the router level instead of on the pihole.
Is it ok to leave the DNS env vars since they’re for DNSMasq
I wouldn't leave DNS1 ENV set to 127.0.0.1, it should have an external sever. It's circular pointing dnsmasq at localhost (it's self).
is there a way in pihole to exclude specific IP addresses from having any content blocked?
There are a couple ways to approach that, my first suggestion is just have her disable Pi-hole by programming her DNS static to an external server is probably the simplest. If you want her to have Pi-hole in the evening when not working then use the web interface disable during her work hours. You could also try whitelsting her work's domain(s) with a wildcard or regex.