Weird DNS with Android

Started by Ceaus, January 20, 2021, 09:35:08 PM

Previous topic - Next topic
I have this weird DNS situation on my home wifi network which I'm totally confused about. Please help.

OPNsense 20.7.8-amd64. The configuration is pretty simple. Just a few rules to keep my Chinese IP cams off the internet and an openVPN connection for when I'm on the road.

Local name resolution works fine on all laptops.

But: all phones (3x Android) can not resolve internal hostnames (public hostnames ok). The weird thing is, when I go on data and connect through openVPN, the local name resolution works fine. I've switched between Dnsmasq and Unbound, and the result is the same. When I look at the Dnsmasq log file, I do see proper query responses for those hostnames.

It has worked in the past, so something has changed between now and, say, 2 months ago.

What is going on here? And why the phones don't and the laptops do?

These phones might actually be using Google DNS. I've recently encountered this under very specific circumstances: The phone is connected to Wi-Fi (not VPN), the Wi-Fi is IPv4, only one DNS server is assigned via DHCPv4, this DNS server doesn't support DoT and Android's 'Private DNS' feature is set to automatic.
If this applies to your situation, you may for example configure two DNS servers in the OPNsense DHCPv4 settings or disable 'Private DNS' on the Android devices.
OPNsense virtual machine images
OPNsense aarch64 firmware repository

Commercial support & engineering available. PM for details (en / de).