Created
February 7, 2020 07:08
-
-
Save sharunkumar/b6195cbbd26a0039ec87fbd3829aa6b3 to your computer and use it in GitHub Desktop.
Enabling / Disabling private DNS in android via ADB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rem to disable private dns | |
| adb shell settings put global private_dns_mode off | |
| rem to enable private dns with hostname (example with dns.adguard.com) | |
| adb shell settings put global private_dns_mode hostname | |
| adb shell settings put global private_dns_specifier dns.adguard.com |
Be careful because on second generation Firesticks (Fire TV 4K MAX) the commands that allow you to change the DNS completely block your internet connection on all your connections.
@crafty991 @markettepigeon
I have pihole in my network, so it blocks most of it without setting any private dns. But sometimes it bypasses pihole by using the hardcoded 8.8.8.8 DNS. I blocked 8.8.8.8 using a NAT rule on my router and now it's using pihole properly.
The same way you can set NextDNS as the dns on your router and add a NAT rule to block the 8.8.8.8 IP.
What if I want to make the dns read-only , I mean such that it can't be changed from mobile at least
You can't, you will need root for that.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran those ADB commands on the Fire Stick 4K Max 2nd Gen and it worked for about a month and a half. But now I'm having problems with the Internet connection: when I start it up, I get a “No Internet connection” warning and there's no way to get it to work (I've already tried restarting both the router and the Fire Stick). The only way to fix it is to disable private DNS with the command “settings put global private_dns_mode off.” Is anyone else experiencing the same problem and has found a solution?
Additional information: I use NextDNS, but the problem also occurs with other DNS servers.