How do you handle your local DNS on your mobile device? reddit / selfhosted ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 11:54 I have a local Adguard home sever, which is used as DNS and DHCP Server. This is completely working fine on my Computers. I was wondering why my phone is still showing ads which were blocked on my PC. Then I found out that my mobile device is not using my local DNS. I am using a public tld in my home to have valid let's encrypt certs also on my private services. But this is not working on my Android. I found out that my phone is using hard coded DoH Servers. I found people with the same problem online, they are blocking DoH and routing all Port 53 traffic to the local DNS. I did the same. But the only thing I get as result is a timeout in the mobile Webbrowser. How is it possible to use my local DNS server with public tld on mobiles? Any help is appreciated 👍 ---------------------------------------------------------------------- ElevenNotes · 2023-11-09 12:03 I doubt that you can't change the DNS your device is using unless its a company device with company policies? ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 12:05 In android every App can use their own DNS server. My DHCP is leasing my local DNS server. But it's getting ignored from Android or the app. ---------------------------------------------------------------------- ElevenNotes · 2023-11-09 12:06 Then simply add a vIP with that hardcoded IP to your adguard. ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 12:08 Android doesn't care about my Adguard. It's directly using cloud flare DNS. I can see this with https://dnsleajtest.com for example ---------------------------------------------------------------------- ElevenNotes · 2023-11-09 12:10 Yes but in order to do that it has the IP of these servers hardcoded. Nothing from stopping you to assign a subnet with these IP's to your router so the client will use your adguard instead of cloudflare, you will break the DNS of these servers for any other purpose though. Is it a mobile game and you want to stopp the adds? How about simply blocking access to the cloudflare IP's for this client? Does it then fallback to the DNS of the phone? ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 12:11 That's what I tried. Just ending in a timeout. ---------------------------------------------------------------------- ElevenNotes · 2023-11-09 12:12 If it doesn't fall back assign the cloudflare DNS IP's to your adguard. ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 12:13 I already did everything with Port 53 routing to Adguard. But android is using DoH. I cannot reroute this. ---------------------------------------------------------------------- Firestarter321 · 2023-11-09 12:13 I just port forward any port 53 traffic that isn’t destined for my DNS server to my DNS server ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 12:14 I did the same. But android is now using DoH. ---------------------------------------------------------------------- ElevenNotes · 2023-11-09 12:20 IP, for the fourth time. Assign the public IPv4 IP for the cloudflare DNS to your local adguard, either for the entire subnet or only for that client (isolation). ---------------------------------------------------------------------- Firestarter321 · 2023-11-09 12:22 Could you just change the rule to say if the destination is the Cloudflare DNS server IP and port is 443 forward it to your DNS server instead of it supports DoH? ---------------------------------------------------------------------- Firestarter321 · 2023-11-09 12:24 https://www.reddit.com/r/dnscrypt/comments/cect1v/doh_is_easy_to_block / ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 12:24 I'll need a moment to understand what you mean. But thanks for your time already! ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 12:25 Forwarding ssl packages will not work I guess ---------------------------------------------------------------------- certuna · 2023-11-09 12:36 with iOS/iPadOS it's as simple as downloading a DNS profile https://ww w.reddit.com/r/Adblock/comments/koowte/encrypted\_dns\_profiles\_for\_ ios\_14/ ---------------------------------------------------------------------- Calm-Size-1110 · 2023-11-09 14:26 Asus router with merlin firmware have an option called “global redirection” that can force LAN devices to use specific dns server. https://imgur.com/a/iftioOx ---------------------------------------------------------------------- FierceDeity_ · 2023-11-09 16:50 This won't help against the device using DoH ---------------------------------------------------------------------- FierceDeity_ · 2023-11-09 16:52 I kept hating against DoH for this reason and now they're deploying it without a way out. Or it requires significant extra configuration. My Samsung device still uses my own local DNS, but I wonder when that will also follow. ---------------------------------------------------------------------- zfa · 2023-11-09 20:43 What makes you think this is the case? A DNS leak test showing Cloudflare could just be that is the upstream resolver in your AGH config, for example. Provide your phone model and Android version, I've never heard of the DNS being unchangeable. Bonus punts if you can post a screenshot of your phones 'private dns' settings. ---------------------------------------------------------------------- redditor111222333 · 2023-11-09 20:54 In agh I have configured quad9. Let me try to create some screenshots. ---------------------------------------------------------------------- zfa · 2023-11-09 21:00 And let us know if you have any device management stuff on there like from a workplace. ---------------------------------------------------------------------- Kratomtex · 2023-11-10 02:14 I use wire guard for all my mobile traffic and have wireguard set to use my pihole server for dns ---------------------------------------------------------------------- mattzuba · 2023-11-10 05:53 Disable Private DNS on Android ---------------------------------------------------------------------- ElevenNotes · 2023-11-10 06:17 As I said in my initial comment, only MDM would prevent that, you can change the IP of the DNS server used via network settings on your phone, no need to download profiles. ---------------------------------------------------------------------- redditor111222333 · 2023-11-12 19:55 Not entirely sure, but I think I found the reason. There was still a second dhcpv6 Server in my lan which was pointing to cloud flare. Looks like ipv6 was priority for Android. I need to test that more to be sure that this is really my issue.