1

I have configured dnsmasq to handle the mutiple forwarding rules something like below:

server=/a1.com/10.23.45.66

server=/a2.com/20.45.24.55

These rules will be added dynamically in my application while dnsmasq is UP and RUNNING. Is there a way to enable dnsmasq to pickup these changes dynamically without having to restart it?

As per the below source, its impossible to reload configuration file without restarting dnsmasq. Is there any workaround to reload only those forward rules? https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2004q4/000002.html

I have tried adding the forward rules to a new configuration file and referencing it using conf-file=/etc/dnsmasq.more.conf but didnt help. I also tried sending SIGHUP signal after making changes, but no luck

1 Answer 1

1

Figured out a way to do this. Defined the forward rules in a dedicated conf file and refered it from --servers-file=<file> during dnsmasq startup. This needs SIGHUP signal to be sent to instruct dnsmasq to reload servers-file whenever there's a change

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.