DNS Server keeps changing to Google

Hey all. I have a PiHole on my network and my Fairphone has been happily using it as a DNS server for ages. However, since we upgraded to Android 11 i noticed I was using 8.8.8.8 / 9.9.9.9.

Rather than properly debug what was going on, I changed the DNS server directly on the Wifi network entry for my access point to point to my local server. This worked.

Then a few day later I noticed ads again and saw that it has reset back to 8.8.8.8 / 9.9.9.9.

Is this a new rubbish Android feature? Has anyone else experienced this?

I’d expect your FP to get the DNS server IP from the DHCP server in your wifi network. So it’ll revert the setting every time you connect to this wifi. This is why I think you may probably have to change the setting on the DHCP server.

The AP it is connecting to has the PiHole set as the DNS server to assign. Also, as I sad before I’ve specified a specific DNS server in the WiFi connection settings, which I’d expect to be overriding anything assigned by DHCP (otherwise, what is the point in that screen!)

This is really annoying now. Every now and then, the Fairphone is completely ignoring the statically assigned IP details and deciding to use different ones. Why would it do this?

When I spot it (I spot it when I suddenly start getting ads on Duolingo when on WiFi at home) I just need to disconnect the WiFi and reconnect and it uses the DNS server I’ve specified in the static assignment section

Just guessing, but taken together with the fact that re-connecting Wi-Fi (presumably by turning it off and then on again) leads to using the correct DNS server I’d guess that rules for switching DNS server may have changed in A11. For example, maybe the default behaviour is now to remain with the current server even if switching networks.
Does this mostly happen after you’ve been out of range of your home network?

Good question! I shall try and work that out, but it seems likely!

You might be interested by this article. While the talk is of an announcement, I suspect Google announcements may not always precede the changes they announce. Indeed, the official blog says “by the time you’re reading this …”

On my FP4, I found the setting “Network & Internet → Private DNS”, which I assume refers to this feature. Maybe you can turn it off and give it a try.

1 Like

That feature is not compatible with a pi-hole because it requires a fully qualified domain name as parameter.

Using it would also mean that your phone’s DNS wouldn’t work outside of the house.

Usually configuration is through the router (various techniques but basically the router tells all the devices to use the pihole for DNS). It’s a subject you can make as complicated as you wish :wink:

Yeah I think this is the case. I was away this weekend. Before leaving, no ads. Got home, reconnected to WiFI and my DNS server has changed to my router (rather than google this time) which is NOT what is specified in the static addressing bit. Disconnect and reconnect and the DNS is back where it should be.