Phone bypassing home wifi network DNS preferences...?

I have Pi-Hole set up on my home network to provide DNS to connected devices. I notice that I can’t make my /e/phone use it; it seems to bypass the Pi-Hole every time, even if I restart the DNS server, the phone, the router…

Is this expected? Does /e/ override home wifi/DNS preferences, and default to the DNS settings that have been entered on the phone?

In the phone settings ensure pivate dns is set to off and use network dns is set to on. If that doesn’t work then maybe file a bug report.

Doesn’t that just result in the phone defaulting to whatever the mobile network uses for DNS? (Realizing that I could set the phone to airplane mode plus wifi to avoid that, but then I’d have to re-enable Private DNS every time I disconnected from my home wifi.)

Edit:
Setting to Airplane Mode and wifi, using Network DNS, does indeed route through the Pi-Hole.

Setting to Airplane Mode and DNS back to 9.9.9.9 seems to prevent the phone from using my home wifi DNS server, even when connected to my wifi.

Setting back to LTE (still with 9.9.9.9) and connecting to wifi still bypasses home DNS server. (This doesn’t happen with my other mobile device.)

Use network dns will use dns of whatever network the phone is connected to. So, when on your wifi it will use the pi-hole. When on the mobile network it will use the carrier dns. A wifi connection will override the mobile network so you’ll either need to reconfigure settings when switching between wifi & mobile, as suits your preference, or pick one setup and live with some compromise.

1 Like

That’s what I, too, would expect. I just don’t understand why it’s not happening in airplane mode over wifi (when my phone’s DNS is set to use 9.9.9.9). Theoretically, it should still pass through Pi-Hole. Oh well…

No it won’t. You’ve explicitly said use 9.9.9.9. So it will ignore the pi-hole and use 9.9.9.9 whether you’re on mobile or wifi. To use the pi-hole you must either specify its ip address in the phone dns settings or you must set use network dns to on. The former obviously won’t resolve on mobile unless you expose it to the internet (not a good idea according to the pi-hole developers) or connect via a home vpn. The latter will obviously resolve to carrier dns when on mobile which is possibly a compromise too far. There is no perfect solution but hopefully the information above is enough for you to determine the best one for your circumstances.

2 Likes

Thanks for the clarification on that.

In my router settings, I think I recall experimenting with a different phone, mandating the Pi-Hole as its DNS (while the phone had a Private DNS still set, and while it was in airplane mode with wifi on). I think it worked then, but I might be mistaken.

I’ll have to do some further checking with that phone, for comparison. Thanks for taking the time to respond. :slight_smile:

I have similar problem.
Connected to my home network, disconnected from mobile data, restarted the phone. The phone works OK, DNS gets resolved, but the local domain addresses don’t resolve.
DHCP delivers DNS ip address correctly to all other devices (100+ devices on network, all DHCP).
When I manually set the DNS IP to point to home DNS, the local .lan resolving works OK.
No idea how to check the DNS settings - where does the phone gets the DNS.
Tried adb shell:
getprop | grep dns

  • nothing
    cat /etc/resolv.conf
  • no such file
    nslookup
  • no such file
    netstat -nluap does not show any connection on port 53

Can anyone point me to method how can I find out what DNS server is really used?
Thanks!

Does this help? https://pureinfotech.com/check-network-traffic-dns/

However, if you’re routing through a VPN, it may be providing its default DNS lookup, so the website above will reflect the VPN’s server, probably.

In my Pi-Hole dashboard, I see devices being directed to my selected DNS provider (Quad9), with the exception of my /e/phone, on which I use /e/'s preset (which also happens to be Quad9).

You might also see entries for the DNS provider in your router’s wireless connection log.

Sorry, but this is of little help, honestly.
The Quad9 should not be pre-selected when I’m on home wifi. The wifi dhcp-supplied dns server should be used - local dns and then opendns.

I know how to check dns settings on all my linux machines, even my esp8266 devices use correct dns.
Just not my phone…

I got help on the telegram from very friendly users. My issue was very difficult to track - what happened is my AP issued different DNS for ipv6. While my IoT devices are connected to their own AP, they did not suffer the issue.
I reconfigured the AP to only forward traffic between the WiFi and ethernet and suddenly /e/ started to work. Sorry for the confusion and thanks for the help!