Pi-Hole kit

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,506
Reaction score
11,922
But now I have an issue with my new Android 11 OS phone -- Realme X50 5G (last year's model with SD765G CPU). Somehow it uses Google's DNS (based on DNSLeakTest.com) and bypasses my local Pi-hole DNS (using Cloudflare as up-stream DNS). I need to find a way either to change it on the phone, or force it to use local Pi-hole DNS.

Google seems to suggest that Realme UI will hijack the DNS and use hardcoded Google DNS and indeed that seems to be true -- I just checked the other new Realme X7 5G (Android 10) and it has the same hardcoded Google DNS.

My work laptop is using Cisco OpenDNS which I can not change. That is okay and anyway I will need to use the company VPN as well.

Reference on Realme UI and Pi-hole.
1)

2)https://discourse.pi-hole.net/t/problem-on-realme-6-device-android/36040
( I have not tried the solution which says to block 53 port access for the device in question)

3) https://discourse.pi-hole.net/t/pih...n-one-phone-but-blocks-on-another-phone/39364 (Turning OFF Private DNS does not work for me)
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,506
Reaction score
11,922
This seems to be tough. The Google DNS is hard-coded for Chrome. If I use Firefox it will be okay. And Firefox Android supports Ublock Origin add-on. So this will be my temporary workaround.

Even if I tried the HijackDNS firewall.setting under OpenWRT it does not seem to work with Chrome browser.
https://forum.openwrt.org/t/block-and-redirect-dns-to-pihole/48478/9
If I enabled designated private DNS using Cloudflare family DNS then it will use Cloudflare, but it defeates the purpose of using local Pi-hole and ad-block does not work well. So looks like Realme adds Google DNS as the secondary private DNS server (DoT).

Normally the private DNS is set to Auto and that does not help. Setting the option to OFF does not help either.

Maybe more brutal force method is needed to filter out DoH/DoT traffic and maybe LAN aliases is also needed.
https://openwrt.org/docs/guide-user/firewall/fw3_configurations/intercept_dnshttps://openwrt.org/docs/guide-user/network/network_interface_alias
 
Last edited:

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,506
Reaction score
11,922
This seems to be tough. The Google DNS is hard-coded for Chrome. If I use Firefox it will be okay. And Firefox Android supports Ublock Origin add-on. So this will be my temporary workaround.

Even if I tried the HijackDNS firewall.setting under OpenWRT it does not seem to work with Chrome browser.
https://forum.openwrt.org/t/block-and-redirect-dns-to-pihole/48478/9
If I enabled designated private DNS using Cloudflare family DNS then it will use Cloudflare, but it defeates the purpose of using local Pi-hole and ad-block does not work well. So looks like Realme adds Google DNS as the secondary private DNS server (DoT).

Normally the private DNS is set to Auto and that does not help. Setting the option to OFF does not help either.

Maybe more brutal force method is needed to filter out DoH/DoT traffic and maybe LAN aliases is also needed.
https://openwrt.org/docs/guide-user/firewall/fw3_configurations/intercept_dnshttps://openwrt.org/docs/guide-user/network/network_interface_alias

Even after following the OpenWRT guide to block DoT and DoH (tested to be good as I can not enable private DNS since the providers are blocked), the Realme UI Chrome browser still uses Google DNS. I will give up for now.

As a workaround I have set up Firefox as the default browser for our three Realme phone (Android 9/10/11) and installed uBlock Origin add-on to block ads.
 

xiaofan

High Supremacy Member
Joined
Sep 16, 2018
Messages
35,506
Reaction score
11,922
This seems to work -- Black hole routes, using static route to make Google public DNS IP addresses not reachable at all. Tested using OpenWRT (removed all the added firewall rules, just add the static route) and Asus RT-AX82U. Not so sure whether it will break any apps or devices or not. The first test is for my Chromecast 1st gen dongle and it does work.

Ref: VPN vendors (or smart proxy vendors) seem to recommend this weay to block Google DNS.
https://vpnreviewer.com/androidtv-streaming-unblockinghttps://www.expressvpn.com/support/troubleshooting/asus-block-ip-address/https://www.keepsolid.com/smartdns/manuals/block-google-dns-on-routerhttps://support.smartdnsproxy.com/article/101-static-ip-routing-for-router-modem
 
Last edited:
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top