Solving DNS issues with local DNS server and external hostnames

I had a weird problem when trying to connect to a navidrome server running locally. I configured the server to run on http and set up caddy as a reverse https proxy to forward requests to a subdomain managed by myself. I then configured my local DNS server to answer requests for that subdomain with an A-Record pointing to the navidrome server.

When entering the subdomain as a host in symfonium, a “could not resolve hostname” error poped up. Looking at the network settings of the android device running symfonium, I noticed two DNS servers were configured, although I thought I had set up my DHCP Server to only serve the IPv4-Address of the local DNS server. Strangely though, the android client showed another IPv6-Address that I didn’t know. Turns out it belonged to my router, which is advertising itself as an IPv6-DNS server unless explicitly configured not to do so.

So if you have a similar setup and use an openwrt-router as a DHCP server alongside a local DNS Server, make sure to disable the “Local IPv6 DNS server” setting. If you’re not doing it via the GUI, the configuration setting for the interface under /etc/config/dhcp is

config dhcp 'lan'
    ...
	option dns_service '0'
    ...

Hey, I am also using OpenWRT and have a local DNS (Adguard Home) hosted on RPi. I am also getting the same error when i try to use my local domain name. I have turned off the IPv6 DNS server from my router still the app can’t resolve the domain name.

How did you get it fixed?

Sorry. My setup is a little bit complex. Also had some phantom bugs.

My setup:

  • Dual router (both on OpenWRT) one primary one dump.

  • Navidrome and others on TrueNAS server.

  • Traefik & adguard on a RPi 4

But basically. Besides setting custom DNS I also had to set DHCP options inside

Interface->DHCP->Advanced

and put 6, as DHCP option so that the router sends them downstream to all the clients. This is what threw me off.

It’s working now though. Scratched my head a lot for last 3 days. Because things worked on PC and Android browser but not in android apps.