Try to Consider a scenario where the OpenWRT IS the client.
To make it more plastic for you, let's imagine there is a port forward, across my OpenWRT Gateway, through HAPROXY, VLANS,... where a OpenWRT Device is listening on SSH, and is used somewhere deep down as a Jumphost to other networks. Domain-Name-System was invented for a reason.
Unfortunately, i'd like to forward a specific domain (*.mydomain.lan) to another DNS:53 Server. it seems the DNS-Server/dnsmasq is dropping .lan lookups and does not forward.
nslookup to localhost:127.0.0.1:53 and forward *.mydomain.lan to a different DNS Server.
As all hostnames/domains/etc/hosts are managed on the 192.168.100.1 System. Finally i'd like to move directly to /etc/hosts instead of domain in /etc/config/dhcp
config domain
option name 'ap'
option ip '192.168.100.2'
I expect there is a config which is done via UCI, /etc/config or Luci.
then there's no point in having it running, sorry if it makes things more plastic to you.
and by putting the upstream DNS in resolv.conf you're bypassing it completely.
-S, --local, --server=[/[]/[domain/]][[#]][@][@[#]]
Specify upstream servers directly. Setting this flag does not suppress reading of /etc/resolv.conf, use --no-resolv to do that. If one or more optional domains are given, that server is used only for those domains and they are queried only using the specified server. This is intended for private nameservers: if you have a nameserver on your network which deals with names of the form xxx.internal.thekelleys.org.uk at 192.168.1.1 then giving the flag --server=/internal.thekelleys.org.uk/192.168.1.1 will send all queries for internal machines to that nameserver, everything else will go to the servers in /etc/resolv.conf.
Is there a particular reason you're so hellbent on running a DNS server on the AP? Why do you want name lookups to go to an internal server on the device and then be forwarded to the main DNS server, rather than just asking the main server directly (like all other clients)?
Sometimes it's worth digging into a topic to understand it.
Thats already the directive to use. Unfortunately, i do not understand how to pass the "server" in front of the /mydomain.lan/192.168.100.1 to match the dnsmasq syntax.
Still it bugs me, there is a "list server" option in /etc/config/dhcp but it's not working as expected.
The Syntax as described in the man page from dnsmasq does not work. The dnsmasq does not restart.
Well I suppose that's kind of an answer.... Anyway, I'm done here. You're clearly fixated on making this far more difficult than it needs to be. I'll leave this to those with more patience.
nope, the /etc/resolve.conf is for me the way to go.
Actually it was you which provided the/an answer. Thank you for that.
The question has now changed. Why does "list server" does not work as expected.
Anyhow, that's a Community Driven Project.
Understand it, fix it, build it, test it, create a pull request to master so it will be fixed in the future. <= thats my approach.
If it's an implemented option which never worked, get rid of it. Remove it from Master.