How to properly integrate samba 4 Active Directory DNS

Can somebody tell me what the proper way is to integrate a Samba 4 Active Directory DNS into existing OpenWRT DNS. It’s a standard setup with kresd & dnsmasq. The Active Directory DNS handles a subdomain prefixed with “ad.”.

I first tried to enter it in into Luci interface as forwarding DNS with no effect. Then I changed dnsmasq.conf and added some SRV records they say is needed. I removed the “authorative” checkbox in Luci.

Then I thought, it seems that all that changes are with no effect because kresd does not know about the settings (which is by the way one of the main problems with Turris Omnia. Luci is not able to handle kresd setup properly).

So I added a custom conf for kresd which added also a forward dns for the subdomain there and then it worked.

My question is: would it have been enough to just have the kresd config file and skip all the rest? Why is Luci so inadequate for this task? Do I need the changes in dnsmasq.conf (the SRV entries,), etc?

Or is there even a better setup and what did is just some work-around?

Correct, you only need to configure kresd (in default setup) by editing config files.

I understand it’s a bit confusing that luci shows the DNS config – but it only configures dnsmasq which isn’t used for DNS by default – neither on Turris 1.x which uses unbound, nor on Omnia which uses kresd. It’s explained in the wiki, but not everyone looks there first.