0

I've setup my WiFi connection on my Galaxy S7 to use a custom DNS server. My PC runs a DNS server at 192.168.0.100 and serves a few A records:

home.local    192.168.0.100
shed.local    192.168.0.101
*.shed.local  192.168.0.102

When I run tracert on my PC (192.168.0.100) it correctly resolves home.local, shed.local and *.shed.local.

Using PingTools I ran tracert on my phone. home.local and shed.local both resolve correctly to their respective addresses.

However the *.shed.local yields:

Unknown host

Is there some difference in implementations of DNS between Windows and Android?

0

Yes, you cannot specify wildcards in /etc/hosts in linux (and therefore Android). People in Linux world have moved on to dnsmasq, I'm not sure what is the equivalent on Android. You'll have to work around it (maybe use proxy or some other setup?)

  • I am using a custom DNS server. I was able to make it work by mimicking the results returned from my 3rd party domain name server. The reason that it works on Windows is that for some reason it accepts a wildcard answer from the DNS server (whereas the hosts file also doesn't allow wildcards on Windows). To make it work on Android I had replace the single wildcard answer with a virtual CNAME record (based on the requested domain) pointing to an A record which I add as a second answer. This record points to the actual IP. – Ropstah Dec 27 '17 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.