Allow users to add extra dnsmasq options

So, lately I’m working on this test setup, which uses an auto discovery feature.
This requires an SRV record on the DNS.

I have been searching around on the net, but NethServer currently does not seem to have an option for that. It only configures the records it needs itself for the AD and such.

Since dnsmasq is used in the background, and dnsmasq is able to do srv records,
would it be possible for the NethServer developers, to allow the dnsmasq.d directory as a means to add extra dnsmasq options? (For those of course who are knowledgeable.)
This would not need to interfear with regular conf file being generated and overwritten by NethServer. All that is needed is to add “conf-dir=/etc/dnsmasq.d” to the file

At the moment, I’m working on configuring an extra dnsmasq DNS server, to provide these records to my Nethserver as an upstream DNS, but of course, this is less than ideal…
The routing is killing me, as the extra DNS is now the host machine of the NethServer Virtual Machine and I’m probably creating circular references…

Hi and welcome to NethServer Community,

NethServer uses templates to write config files. You could create a custom template fragment to add the line to dnsmasq.conf:

Create custom template dir:

mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf

Create fragment:

echo "conf-dir=/etc/dnsmasq.d" > /etc/e-smith/templates-custom/etc/dnsmasq.conf/91dnsmasqd

Apply config:

signal-event nethserver-dnsmasq-update

4 Likes

Thank you so much, MrMarkuz.

This has solved my problem.
I implemented as suggested, and the “SRV record” is now running. :smiley:

Once again, I learned more about linux and NethServer.
(I made sure I to investigate the commands, before I tried them.)

In hindsight, I also realized that one could directly add a line “srv-host=” to the dnsmasq config file, using this method, to create an SRV-record on the network.

Anyway, I kept the method as first described.

thx again, and best regards.

2 Likes