this post was submitted on 22 Aug 2024
10 points (85.7% liked)

Selfhosted

39167 readers
394 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I have a home network with an internal DNS resolver. I have some subdomains (public) that maps to a real world IP address, and maps to the home server private address when inside home.

In short, i use unbound and have added some local-data entries so that when at home, those subdomains points to 192.168.x.y instead.

All works perfectly fine from Windows and from Linux PCs.

Android, instead, doesnt work.

With dynamic DHCP allocation on android, the names cannot be resolved (ping will fail...) from the android devices. With specific global DNS servers (like dns.adguard.com) of course will always resolve to the public IP.

The only solution i found is to disable DHCP for the Wifi on android and set a static IP with the 192.168.x.y as DNS server, in this case it will work.

But why? Aynbody has any hints?

It's like Android has some kind of DNS binding protection enabled by default, but i cannot find any information at all.

you are viewing a single comment's thread
view the rest of the comments
[–] theit8514@lemmy.world 3 points 3 weeks ago (1 children)

You mentioned ping. If you're using Termux you may need to manually update its DNS settings (different from the system DNS). The file is /data/data/com.termux/files/usr/etc/resolv.conf

To make it roam you probably want your home dns first then some internet resolvers after that.

[–] Shimitar@feddit.it 1 points 3 weeks ago

Thanks! This explains a few things... But not why Android is IGNORING my DNS pushed via DHCP even if private DNS is disabled...