I have a bunch of local dns records set up in pi-hole. All of them point to a local ip.
Setting the dns manually on a per-client basis works fine except for Android devices.
I can not change any settings on my router.
Is there a way to set up DNS on android reliably?
Client info:
OS: Android 15 (lineageos 22.2)
Server info:
Host OS: EndeavorOS (arch based)
Pihole version: docker compose 2025.10.3
On Android I make sure to:
- Set a static ip
- Set dns1 to ipv4 address of my pihole
- Set dns2 to the same address as dns1
- Set private dns to disabled
Expected Behaviour:
Android uses pi-hole for all DNS requests.
Actual Behaviour:
All lookups are resolved by the dns of the ISP.
I've determined this by using dnscheck.tools.
Output on Desktop:
...
Your DNS resolvers:
Cisco OpenDNS
A bunch of ipv6 addresses
...
Cloudflare
Two ipv4 addresses
CLOUDFLARE_someidentifier
One ipv6 address
CLOUDFLARE_someidentifier
One ipv6 address
WoodyNet
Two ipv4 addresses
A bunch on ipv6 addresses
...
Output on Android:
...
Your DNS resolvers:
MYISP
dns4ISP: isp hostname + misc
dns4ISP: isp hostname + misc
dns6ISP: isp hostname + misc
dns6ISP: isp hostname + misc
...
Debug Token
https://tricorder.pi-hole.net/YRMfDzpq/
Troubleshooting
Things I've tried:
- Putting the server ipv6 address into the android dns field. Android can't accept an ipv6 address in this field.
Some curiosities:
- When I execute
getprop | grep dnson my Android device. Nothing shows up. dumpsys connectivity | grep -A20 "NetworkAgentInfo.*WIFI" | grep DnsAddressesreports 3 dns addresses. Two of them are ipv6 from my isp. The third is ipv4 from my pihole server.- When I use ReThink dns and point that to pihole, everything works, but it is EXTREMELY slow to resolve. Most of the time 5+ seconds for all lookups, local and wan.
My understanding?
As far as I understand it isn't really possible to set static dns servers on Android. Because it will always prioritise ipv6 addresses. Which I cannot set myself. Thus it uses the dns provided by dhcpv6 or rdnss.
I can use a workaround like ReThink to trick android into using the correct dns.
Using ReThink would be fine, but the resolve delays make it unusable. Many apps even stop working due to the delays.
I do not know if this is a ReThink issue or a Pihole issue.
I don't know how to fix this. If anyone would like to give me some pointers, that would great!