Configuring OpenWRT as Managed Switch with just Local DNS Server

Hello! My ISP router is terrible: its DNS server doesn't allow resolving local host names! That's super annoying when I want to log into my NAS or whatever.

Unfortunately, the ISP router is also so terrible that I can't use the DMZ feature to bypass it, AND I can't reliably change the ISP router settings because they will randomly change back. And I don't want to take on the compatibility problems of a double NAT, so I need to find something VERY compatible with this crappy ISP box.

My idea is to ask if there is a niche networking hack to somehow run a second DNS server that will get picked up by my web browser or other clients failing to resolve a host name from the ISP DNS server taken from the ISP DHCP server on the ISP router.

Maybe there is a way to spam broadcast local host names? It wouldn't conflict with anything because the local ISP DNS is just a bastard relay and ignores the local network.

As a backup plan, if nothing else is possible, the one thing I can do is change the ISP router's DNS server IP and configure OpenWRT appropriately to be just a DNS server. Then I would "just" have to change the ISP router's DNS server IP back to OpenWRT every time the ISP router lost its mind and I wanted to access a local host name.

Sorry for the esoteric problem, and thanks for the help!

This is how I do it:

This will also allow you to add IP addresses of local hosts and they can be looked up by any DNS server.

Otherwise, the following should help: https://openwrt.org/docs/guide-user/firewall/fw3_configurations/intercept_dns

This will not apply if the OpenWrt device is being used as a managed switch (and not actually performing routing). The firewall is not involved with L2 connections (switching).

That said, if you manually configure your client devices to use the OpenWrt device as their DNS server, that should work just fine (provided that the OpenWrt configuration includes a preferred DNS upstream resolver). Most full OS's (Mac/Win/Linux, iOS, probably Anroid) have the ability to use DHCP to obtain an IP address yet still allow you to specify your preferred DNS server. Embedded devices like TVs and STBs, game consoles, and the like may or may not have this functionality.

Once that is working in general, you can then create a set of DNS records for your local network within dnsmasq (on the OpenWrt device), and it should do what you want.

Is there any reason why you can't fix this nuisance at source? That is, replace the router with your own device running openWRT?

Which problems do you have?
I'm running double NAT since decades without any probs (also a creepy ISP box).