How DNS are set on android?

7 months ago by Blackbeard to c/android

I'm using e/os and I want to be sure that, when connected to my local network, my local dns server is used, however, no matter what I do, my phone always use google's one. Is there any way to fix this?

bravesilvernest 7 points 7 months ago

My approach: enforce redirect on my network of all DNS queries to my router (that are hitting :53).

It has worked so far ๐Ÿ™‚

path: 0 22786400, hotness: undefined, score: 7, children: 1
blackbeard 2 points 7 months ago

That's quite drastic but maybe the only really effective. I still find all of this very difficult to believe. I mean, am I wrong if I say that DNS is fundamental to be sure your traffic is safe? But even more weird...I'm using e/os, is supposed to be focus on privacy and "degoogling" of our life but...it use google DNS? I'm also worried I might not understanding what is really happening here, that an app I used changed the DNS settings on my mobile.

path: 0 22786400 22802958, hotness: undefined, score: 2, children: 0
wasu 4 points 7 months ago

Not sure about e/OS but generally on android you can set DNS when connecting to Wifi.
So you should be able to change that in Settings ยป WIFI ยป [Your local network] ยป DNS

path: 0 22789924, hotness: undefined, score: 4, children: 7
blackbeard 1 point 7 months ago

Did you ever tested it? Because in any android device I got, it always "default" to 8.8.8.8 - google's one. I have to connect to a vpn do get local ips being resolved. I just don't get it, is this normal?

path: 0 22789924 22790757, hotness: undefined, score: 1, children: 6
wasu 2 points 7 months ago

I don't have a custom DNS server configured, but that's what I tested:

  • Went to Settings ยป Connections and Share ยป Private DNS - made sure it is off (it takes priority when set)
  • Went to Settings ยป WiFi ยป [My local network] ยป DNS1 and entered my router's IP

After that it started to use my ISP's DNS servers (preconfigured in router) instead of CloudFlare 1.1.1.1 (what was default on my android when connecting to WiFi

path: 0 22789924 22790757 22800051, hotness: undefined, score: 2, children: 5
blackbeard 1 point 7 months ago

Yes but how do you know that is using that? I mean, did you try to resolv a local address? I have test it using a Terminal (termux) - If I use did and seems to report all the time, regardless of which connection and despite setting my local DNS setting on a static configuration for the wifi. Is this the same for you? can you share some screenshot?

path: 0 22789924 22790757 22800051 22802915, hotness: undefined, score: 1, children: 4
wasu 2 points 7 months ago

I visited http://ipleak.net/ to check which dns is used.
In Termux nslookup will use 8.8.8.8, but I suspect it takes it from Termux environment that doesn't sync with android settings.

path: 0 22789924 22790757 22800051 22802915 22803816, hotness: undefined, score: 2, children: 3
fleem 2 points 7 months ago

how do we get phones to see local DNS records?

path: 0 22786047, hotness: undefined, score: 2, children: 4
blackbeard 4 points 7 months ago

like every other devices I supposed..but it doesn't work in any mobile I got. the dns server stay google's one no matter what you do.

path: 0 22786047 22786095, hotness: undefined, score: 4, children: 0
thelittleblackbird 4 points 7 months ago

I had the same problem in my network and the solution is not easy.

Many, but many android apps are using Google dns servers just to leak the location of the phone (using the nearest geographical Google server).

The only way I found it was to instsll an opnsense router and redirect requests to port 53 to the internal dns server.

DoT (dns over tls) is blocked because it can not be redirected

DoH (dns over https) is (almost) imposible to block and still is a hole in current systems.

Good luck solving this

path: 0 22786047 22786133, hotness: undefined, score: 4, children: 2
Engywuck 3 points 7 months ago

You can block DoH by using a comprehensive blocklist of DoH domains. Both NextDNS and ControlD do this.

path: 0 22786047 22786133 22786181, hotness: undefined, score: 3, children: 1
thelittleblackbird 1 point 7 months ago

Yep, I checked that possibility too but it is like putting barriers into the see because :

  • DoH can also share the IP-PORT with some legits websites
  • there is not a proper way to scan the web to see if there is a proper service
  • the effort to setup one is orders of magnitude lower tan to track then and then to filter it properly

Honestly is just the prey-predator competition. It won't stop ever

path: 0 22786047 22786133 22786181 22790115, hotness: undefined, score: 1, children: 0
fonixmunke 1 point 7 months ago path: 0 22802632, hotness: undefined, score: 1, children: 1
blackbeard 1 point 7 months ago

Why this matter? Is it posibile to use your local dns ip as private dns? I have tried and didn't accept a local ip address

path: 0 22802632 22802890, hotness: undefined, score: 1, children: 0
android
android

@lemmy.world

login for more options
34863
2216
1909

DROID DOES

Welcome to the Android community on Lemmy. Here you can participate in amazing discussions and events relating to all things Android.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules


1. All posts must be relevant to Android devices/operating system.


2. Posts cannot be illegal or NSFW material.


3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.


4. Non-whitelisted bots will be banned.


5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.


6. Memes are not allowed to be posts, but are allowed in the comments.


7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.


8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.


Community Resources:


go to feed...