Pulling my hair out on this one. I've been searching for hours but cannot find an answer to what should be a simple thing.
I have unbound installed on one of my routers but only want to use it as a dns server.
The unbound service is putting 127.0.0.1 in the resolve files but I don't want to use unbound for the router dns, I want to use the upstream dhcp dns servers being given.
In other words, I also don't want to use unbound as a dns forwarder but as a simple recursive dns server on the router for emergencies. Outside of that function, I just want the local services to use the dhcp servers being given by the upstream dhcp server.
I don't want to live on the edge :).
I know there is an option, it's a simple directive, maybe two that I used to apply a long time ago but cannot find my notes. I think it was applied in the /etc/config/dhcp file.
The directives said to use the upstream dhcp server dns being provided and not local.
I don't have dnsmasq installed so I have no such option.
The device is not actually being used as a router, just a little sdr antenna and I wanted to have a dns server on it as well for some redundancy.
Before doing that, which is a hack, I know there is a simple directive or two that can be used.
I usually use image builder to keep a copy of my original firmware and tend to make the changes in the files/ directory otherwise I lose track of hacks which is why I don't tend to use hacks.
Just breaking in on this conversation with my 2c:
I've been using unbound for a while now, and what I've noticed is that for DNS requests it is simply a cached DNS resolver. It uses upstream servers to forward any request not in the cache. If you remove the default zones and replace it with a zone with the servers of your choice, you should be set.
To protect against upstream 127.0.0.0/8 responses you can turn on the "Filter localhost rebind" and and there are also options for filtering private rebinds. I'm sorry I am mainly a LUCI user, so I can't tell you the CLI commands...hope this helps tho