Android and DNS

  • Thread starter Deleted member 43669
  • Start date
D

Deleted member 43669

Guest
So I've noticed that recently Android decides it's going to use 8.8.8.8 unilaterally for DNS. Which would be fine, if I didn't have proper DNS (and DHCP) configured at home.

I can tell Android to use a specific DNS server all the time, but that's not great because I have to either publish my internal DNS entries to the public Internet DNS (which actually is not a big deal for me, but the Internet says never do this) or expose my DNS servers to the Internet so I can use them when I'm not on my network (but that means I need to HA, etc.).

I've seen some random apps promising tweaks to this, but I'm not a fan of installing random apps.

To add insult to the injury, I believe that the two Android devices affected by this didn't have this issue previously. So maybe there's something environmental there I can fix?
 

Baenwort

Ars Praefectus
3,144
Subscriptor++
So I've noticed that recently Android decides it's going to use 8.8.8.8 unilaterally for DNS. Which would be fine, if I didn't have proper DNS (and DHCP) configured at home.

I can tell Android to use a specific DNS server all the time, but that's not great because I have to either publish my internal DNS entries to the public Internet DNS (which actually is not a big deal for me, but the Internet says never do this) or expose my DNS servers to the Internet so I can use them when I'm not on my network (but that means I need to HA, etc.).

I've seen some random apps promising tweaks to this, but I'm not a fan of installing random apps.

To add insult to the injury, I believe that the two Android devices affected by this didn't have this issue previously. So maybe there's something environmental there I can fix?


So far the two Android devices in my home (both running 11) respect a firewall rule I have set at my home router to redirect all port 53 traffic to my internal DNS server.
 
D

Deleted member 43669

Guest
Well, they cannot not respect it :) (well, I suppose they could try to detect the firewall rule and do port hopping...).

I was afraid Android was forcing DNS over TLS (which my DNS server does not support), and I didn't think of doing this... but it works. My fiber AP/router doesn't expose support for such "complex" rules, but for $REASONS I'm redirecting traffic through a Raspberry Pi... which does.

edit: that worked for my phone, but not for my "Chromecast with Google TV". I don't see its DNS traffic...
 

Baenwort

Ars Praefectus
3,144
Subscriptor++
Well, they cannot not respect it :) (well, I suppose they could try to detect the firewall rule and do port hopping...).

I was afraid Android was forcing DNS over TLS (which my DNS server does not support), and I didn't think of doing this... but it works. My fiber AP/router doesn't expose support for such "complex" rules, but for $REASONS I'm redirecting traffic through a Raspberry Pi... which does.

edit: that worked for my phone, but not for my "Chromecast with Google TV". I don't see its DNS traffic...

I'm pondering that the Chromecast may be using DoH (DNS over HTTPS) which doesn't use port 53 and wouldn't be caught by that.

So far nothing brought into my house has used DoH yet so I haven't spent the time researching a solution. First draft in my brain has been finding a list someone maintains of DoH server IP's and setting up a rule to redirect traffic to those IPs to a blackhole. However, that could break something if they don't fall back to DoT or plain DNS?

If you find a solution please share! I figure this day is coming eventually for my home network.
 

spiralscratch

Ars Praefectus
3,103
Subscriptor
So far nothing brought into my house has used DoH yet so I haven't spent the time researching a solution. First draft in my brain has been finding a list someone maintains of DoH server IP's and setting up a rule to redirect traffic to those IPs to a blackhole. However, that could break something if they don't fall back to DoT or plain DNS?

If you find a solution please share! I figure this day is coming eventually for my home network.

Stubby's default config has many of the most common ones. However, I doubt blocking those IP addresses will help much. My bet is that any device producer that wants to bypass users DNS settings via DoH/DoT is going to set up their own servers as well.