QUESTIONS

Change DNS for mobile data without using an app

  DNMe       2021/09/06       76


76

The question and answer about this post on Change DNS for mobile data without using an app have a total of 4 answer so far..

asked
4 answers
76 votes

SOLUTIONS: (4)

0
      7

I did not find a way to reliably do it without an app.

I often use OpenDNS Family Shield, but sometimes it blocks me to visit some particular hacking site and then I need to quickly and easily change the DNS servers.

I used to use Set DNS but it stopped to work in Android 4.3 and further, so I created Override DNS, a new app which mimics Set DNS' behaviour, but it's updated to work even in Lollipop. It has some other nice feature like a PIN protection ad a Wi-Fi SSID filter, too.

The only way I can see to do it without an appis something like an iptables rule to redirect any traffic going to udp/53 to some other ip. A similar procedure is shown in a XDA thread.

I paste here the iptables rules for completeness (I did not tested them)

$IPTABLES -t nat -D OUTPUT -p tcp --dport 53 -j DNAT --to-destination 208.67.222.222:53 || true
$IPTABLES -t nat -D OUTPUT -p udp --dport 53 -j DNAT --to-destination 208.67.222.222:53 || true
$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

Everything directed from the Android device to any IP, port UDP and TCP 53 is redirected to 208.67.222.222 which is one of OpenDNS' DNS server.

These commands should be placed in a script which is run at every device boot. That functionality depends on your specific ROM. I don't know if something similar can be done in a stock ROM without using an app. Override DNS solves this problem, too.

0
      8

Starting with Android 9 Pie it is possible to change DNS globally, provided they support TLS. Just go in

Settings → Network & internet → Advanced → Private DNS

0
      9

This info is from 2014. But it might still work. I am not in the position to test it at the moment, but since you are rooted. You could try adding the dns settings to the build.prop file and see if it sticks. Adding the following to the build.prop file should add google as your DNS server.

net.rmnet0.dns1=8.8.8.8
net.rmnet0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4

Taken from this post on the Nexus 5 forums over on XDA. That post can be found here.Item number 21 is the DNS settings.

0
      9

That's not possible without an app, it has to be with an app. Second, you need root access in able to change 1G/2G/3G/4G DNS.


QUESTIONS:



HOME POST

Connecting....
Nfiles Questions - nfiles.xyz the Q nad A blogs sites for free
πŸ—‚ Nfiles Β» Home
πŸ—‚ ModStore
πŸ—‚ Videos
πŸ—‚ Shareurl
πŸ—‚ About us
🌐 Leaks.work
🌐 Malitanyo
🌐 Tagalog Anime 143 πŸ‘€ Mr. snow finger
πŸ‘€ Yoki No moto
πŸ‘€ Xdeveloper
πŸ‘€ Malitanyo Dev
πŸ‘€ Money Motto
πŸ‘€ Ako Johnny Sin
Create with ❀ Questions by nfiles.xyz 2021