Access local services via FQDN/Hostname from Android phones

Hi there,

Local servers (with local/private 172.x ip addresses) can't be accessed here from android phones.

Does not work:
Access any local host via hostname.

Does work:
Access a internet host for which the hostname is configured locally (openwrt hosts) only.
(This is why I assume that my local openwrt-DNS is eventually queried. But android does not seem to like if the ip addresses are local/private then)
Access local host via ip address.
Access anything from any other system (Linux and Windows, Firefox, Chrome, Filebrowser, ping, ssh, ...)

I found other discussions (not this forum). Often it is assumed that android sends everything to google via DNS over HTTPS. This does not seem to be the case here as it works with "local" hostnames with public ip addresses.
There is also mDNS...

To be honest, I am also a bit confused now. Not sure when which type of DNS resolution is expected to run.
I could not even figure out whether openwrt should run mDNS service (I do assume that it does not).

From my point of view there are two possible options to solve this:

  1. Configure my openwrt box to force android clients to use the local DNS always and to trust it also for local/private ip addresses.
  2. Force android to use the local DNS always (only in my local Wifi?) by do some configurations.

Many Thanks for any hints :slight_smile:

1 Like

Hm. Not sure what to make of this.

On the one hand, this seems to be somehow related. There were many assumptions and it is unsure what happend when. After all, it was the app that seems to have the queries to some mircosoft server hardcoded..

By the way: In my case we know that Android does query the local DNS (at least in general). But it does just not seem to like answers with private ip addresses.

I am hijacking the queries from the lan and redirect them to my Piholes. Internal FQDNs are resolved properly from the Piholes. This can be applied too for the dnsmasq as nameserver.

1 Like

It should actually be necessary to hijack DNS queries? This does really feel wrong.

If this is necessary, Android is actually seriously broken.
This would eventually mean that companies, organisations and hotels ... using private addresses in their local network could not use Android devices to access local services.

It is not working properly by bypassing the assigned nameservers from the DHCP and preferring the GoogleDNS.

1 Like

But if it is bypassing the the assigned name-server, why does my Android phone successfully resolve a public host that is configured locally only?
This can work if it is not bypassing my local DNS only.

For instance. I configure "abcdef.abcdef" -> 216.58.206.3
Then I use Firefox on the Android device and type adcdef.abcdef -> reaching google (ok, states "URL / not found, but DNS works!).

I don't know. Setup a packet capture with tcpdump and we'll find out.

1 Like