Dnsmasq.conf and keep changes

Hi all,

For my purposes, I need to change dnsmasq.conf but after some updates or when I change the IP address of the Internet interface, dnsmasq.conf does not keep what I changed.
Is it possible to keep the changes?

I need that Nethserver redirects PXE requests to another server (Opsi with Clonezilla).

Here I change the dnsmasq.conf:
tftp-root=/var/lib/tftpboot
dhcp-option=66,“192.168.1.245”
dhcp-boot=/tftpboot/linux/pxelinux.0,boothost,“192.168.1.245”

After changing the IP address or web interface updates:
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-option=66,“192.168.1.1”

Is it possible to keep the changes?
Is an interface under development to declare another server (next server)? Something like what is possible in, sorry for the comparaison, Zentyal:

I’m sure it will be useful to other people.
Thks a lot.

Hi

you should start reading the documentation…
NS is based on db - templates/fragment - event paradigm

you can’t edit conf files or, as you discovered, your editing will be lost

the header of any templated conf file should have a warning: read it carefully

you need a custom fragment to achieve your goal

http://docs.nethserver.org/projects/nethserver-devel/en/latest/

Thanks for your answer…
In effect, I have already read that in the documentation but is there an alternative to keep “my” changes?

Hence, my second question to the developpers? Is an interface under development?

Hi,
configuration it’s overwritten by template-system.
You can find more information inside the developer manual as correctly pointed out by Stefano.

But we already have plans to extend the web interface. See http://dev.nethserver.org/issues/3036.
Maybe you can suggest some common options we can display inside the web interface?

In the meanwhile, you can achieve your goal using a template-custom:

mkdir -p /etc/e-smith/templates-custom/etc/dnsmasq.conf
echo 'dhcp-option=66,"192.168.1.1"' >  /etc/e-smith/templates-custom/etc/dnsmasq.conf/90custom
signal-event nethserver-dnsmasq-update

yep write your custom-template, or add a template.

the difference is tiny, a custom-template is there to rewritte an official template from a rpm, a template can be used if the developer has let some place/right to add your modifications.

take a look to /etc/e-smith/templates and learn ?

which interface are you talken…just for dnsmask ?

Yes, dnsmasq just to specify the ip address of next-server, the filename et his path.

For template-system, I’ll try it as soon as possible.

Thks