I have a DHCP server which offers a DNS (option domain-name-servers 10.0.0.1;) This is written into /tmp/resolv.conf.auto which is fine. But I'd like to have it also available for the WLAN AP itself - so it should be also find it's way into /tmp/resolv.conf during bootup. Right now I have 127.0.0.1 in it which is useless because my AP has no resolver.
I'm using openwrt-18.06.0-rc2-ar71xx-tiny-tl-wa901nd-v2-squashfs
@eduperez
My FreeBSD Router (10.0.0.1 / 10.0.1.1 / 10.0.2.1 is offering DHCP and DNS beside other stuff to my whole network).
My WLAN AP (10.0.2.2) is connected to it and should get it's own IP from it and should use the FreeBSD Router as DNS as well as forward all DHCP requests to it.
Well, usually you have a local dnsmasq running on 127.0.0.1 which will forward queries to the servers in /tmp/resolv.conf.auto. By default, /etc/resolv.conf is a static symlink to /tmp/resolv.conf. The /tmp/resolv.conf file in turn is usually managed by the dnsmasq init script. If dnsmasq is enabled, the init script will write nameserver 127.0.0.1 into it, if dnsmasq is disabled or stopped, /tmp/resolv.conf will be deleted and replaced by a direct symlink to /tmp/resolv.conf.auto.
So with dnsmasq started, it'll be: /etc/resolv.conf -> /tmp/resolv.conf (with nameserver 127.0.0.1)
with dnsmasq stopped, it'll be: /etc/resolv.conf -> /tmp/resolv.conf -> /tmp/resolv.conf.auto.
I am not sure about the initial state when dnsmasq is not installed on the system.
OK - it seems that the root cause was a misconfiguration of my dnsmasq where I was additionally not aware of having it on the system.
After consulting it's manpage and changing /etc/config/dhcp it seems to work now how it is intended to be (with /tmp/resolv.conf). Thanks for the right pointer.....