M
M
Maxim_Q2020-02-01 01:18:07
Android
Maxim_Q, 2020-02-01 01:18:07

Own DNS servers for 3G or 4G mobile Internet on Android 9?

You need to make your own DNS servers for the mobile Internet.
I try to specify the settings in the /system/build.prop file:

net.dns1=8.8.8.8
net.dns2=8.8.4.4

They are there, I check them and see:
# getprop | grep dns
[net.dns1]: [8.8.8.8]
[net.dns2]: [8.8.4.4]

After I turn on the 3G Internet and these settings are replaced by the provider's settings, where its DNS is:
# getprop | grep dns
[net.dns1]: [10.20.30.41]
[net.dns2]: [10.20.30.42]

Accordingly, DNS traffic goes to its servers.
I'm trying to change DNS manually through the console and the data is changing:
# setprop net.dns1 8.8.8.8
# setprop net.dns2 8.8.4.4
# getprop | grep dns
[net.dns1]: [8.8.8.8]
[net.dns2]: [8.8.4.4]

But the traffic still goes through the provider's servers and does not even want to look at the new settings.
How to fix this and make it go only through the servers I specified and ignore the provider's servers?
-----
Other parameters have also changed, but they do not work and do not help redirect traffic:
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.rmnet0.dns1=8.8.8.8
net.rmnet0.dns2=8.8.4.4
net.rmnet1.dns1=8.8.8.8
net.rmnet1.dns2=8.8.4.4
net.pdpbr1.dns1=8.8.8.8
net.pdpbr1.dns2=8.8.4.4


---------
Phone: Xiaomi Redmi Note 7
OS: HavocOS 2.9 (Android 9)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
1
15432, 2020-02-01
@15432

Emmm
settings - network and internet - advanced - personal DNS server

A
AUser0, 2020-02-01
@AUser0

You can use android SetDNS , but it requires root.
And yes, just changing the parameter via setprog does not help. Either the relevant services do not look there, or they simply enter new parameters "so that everyone can find out", but they themselves do not read ... Something does not work. Or it works, but you need to know the appropriate command.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question