FORUMS
Remove All Ads from XDA

[GUIDE] How to Change DNS in Android Device (8 methods)

827 posts
Thanks Meter: 1,377
 
Post Reply Email Thread
2nd April 2018, 06:47 PM |#21  
drummond's Avatar
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by Boolian

OP - Rooted Devices - Method 5 - it's right there, page 1.
There's an app too.
How much time can that waste?
(If it takes too long to go back one page, the OP is quoted just above your post)

It's unfortunate the discussion combines unrooted and rooted. Mine is unrooted. FYI I had read page 1 - Wartickler mentions 6.1.x problems and asks what version (no reply). syamsoul said "iptables" works on 6.0.1 - and he didn't reply to my query.
It's also unfortunate that you thought criticism would help answer the question.
FYI the link to Universal Init.d is broken.
 
 
11th July 2018, 02:39 PM |#22  
Junior Member
Thanks Meter: 2
 
More
Blokada is another application for non-rooted devices: you can use predefined DNS services like Google DNS, Norton DNS, etc. or add any other service.
The Following User Says Thank You to shaulreznik For This Useful Post: [ View ] Gift shaulreznik Ad-Free
11th July 2018, 09:37 PM |#23  
galaxys's Avatar
Senior Member
Flag Cosmos
Thanks Meter: 2,013
 
More
I'm rooted and have been using 'WiFi Tether Router' for ages (it's in Playstore).
29th November 2018, 04:42 AM |#24  
Member
Thanks Meter: 2
 
More
Well....im running cm14.1 on my onyx and attempted to change my dns to google's with method 4...yep..i successfully changed those properties and checked whether they r applied or not too in the terminal by grep dns command....but the problem is....when i checked my dns server online...both my dns and reverse dns are not changed...i didn't restart my device...what to do?????????
29th November 2018, 12:22 PM |#25  
Member
Thanks Meter: 2
 
More
Well....tried iptables method too....but when i check by getprop command....it shows no change....very sad
5th May 2019, 08:11 PM |#26  
Junior Member
Thanks Meter: 3
 
More
I'm on android 8.0, it works great with the iptables and ip6tables solution.
24th May 2019, 01:17 AM |#27  
Senior Member
Thanks Meter: 23
 
More
Here's a great solution... Nebulo DNS-over-HTTPS (DoH) / DNS-over-TLS (DoT).

I use the DoH option, with Quad9 (9.9.9.9) as the DNS server. You can add your own DNS server, if you want, but Quad9 is a non-profit, has no financial incentive to collect and sell your DNS queries, and the legal infrastructure in their locale prohibits doing so anyway. And they're fast.

DoH sends DNS queries out encrypted, over HTTPS, rather than unencrypted via port 53, so your DNS requests can't get hijacked and rerouted to another DNS server, and the network you're on can't see which DNS queries you're making.

Nebulo sets up a VPN server, just like other DNS changer apps, but the others just let you change your DNS servers, whereas Nebulo lets you change your DNS servers and encrypt your DNS queries. Another difference, most of the others are closed-source and have ads (and analytics or tracking), whereas Nebulo is FOSS, no ads, no tracking.
6th July 2019, 06:42 AM |#28  
caovanthanh203's Avatar
Junior Member
Thanks Meter: 4
 
More
For someone who want to change DNS on Android device, can try there apps:

1. DNS Changer - Change DNS Without Root (Wifi/3G/4G) by HMT Enteprise Limited https://play.google.com/store/apps/d...schanger&hl=en

2. DNS Changer (no root 3G/WiFi) by BGNmobi https://play.google.com/store/apps/d...gon.dnschanger

3. dnspipe - a Dns changer (No Root - IPv6) by Frostnerd.com https://play.google.com/store/apps/d...erd.dnschanger
The Following User Says Thank You to caovanthanh203 For This Useful Post: [ View ] Gift caovanthanh203 Ad-Free
17th July 2019, 10:42 AM |#29  
Junior Member
Thanks Meter: 1
 
More
Please help me changing DNS permanently with init.d or anything which might help me..

Noob friendly instructions please, for init.d scripts and enabling methods..
17th July 2019, 01:10 PM |#30  
Junior Member
Thanks Meter: 1
 
More
I want to change my DNS permanently.
I created script but it's not helping.
Also where to put those scripts in device? I have installed magisk and flashed latest init.d injector.
other than that I'm using redmi note 4 resurrection remix rom 7.0.2 (android 9) and also installed riru core and edExposed.
Can you please check these scripts?

Script-1
Code:
#!/system/bin/sh

iptables -t nat -I OUTPUT -p tcp --dport 53 -j DNAT --to-destination 208.67.222.222:53

iptables -t nat -I OUTPUT -p udp --dport 53 -j DNAT --to-destination 208.67.222.222:53
Script-2
Code:
#!/system/bin/sh
# File without file extension

#IP6TABLES=/system/bin/ip6tables
IPTABLES=/system/bin/iptables

# Maybe need to change $IPTABLES to iptables (if there are troubles applying them)
$IPTABLES -t nat -A OUTPUT -p tcp --dport 53 -j DNAT --to-destination 208.67.222.222:53
$IPTABLES -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to-destination 208.67.222.222:53
18th July 2019, 10:33 AM |#31  
Senior Member
Flag Sydney
Thanks Meter: 1,742
 
More
Quote:
Originally Posted by TigerKing00

I want to change my DNS permanently.
I created script but it's not helping.
Also where to put those scripts in device? I have installed magisk and flashed latest init.d injector.
other than that I'm using redmi note 4 resurrection remix rom 7.0.2 (android 9) and also installed riru core and edExposed.
Can you please check these scripts?
...snip...

Firstly, if you have Magisk, then place your scripts in your service.d path; location of that is depending on version.

You may also wish to add logging to your script so that you know it has actually ran.

I am running Oreo, and I found that using the default service providers DNS, by-passed my ad blocking via host file mods.

I found the following worked. I added in a bunch of settings/values into my build prop. I tested it a while back, but it still seems to work for me, but it may also be ROM dependent. The script has a few includes, but should be pretty easy to workout from the naming. eg
Code:
bb=busybox;
https://del.dog/owunorigab.pl

Its not a script to simply drop in and it will work, I have a whole scripting environment set up over owning an android phone for 8 years, with all these includes and logging etc but the meat is there.
The Following User Says Thank You to DiamondJohn For This Useful Post: [ View ] Gift DiamondJohn Ad-Free
Post Reply Subscribe to Thread

Tags
change dns, dns, dns settings, modify dns, set dns

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes