Modfiying config files

Hi,
is there a way of reloading modified config files by an editor in the WebUI?
For example /var/ipfire/dhcp/dhcpd.conf

Best regards

Did you restart dem dhcp daemon and reload the webui?
Or restart the computer.

Hi,
the dhcp daemon is not running at the moment, but I tried this already. I do not exactly know what you mean by reloading the webui. Reloading the browser does not work.

The general way of config in IPFire is as follows:

  • set values in the WebUI
  • save / apply by press the button
  • the .cgi writes the appropriate ‘settings’ and ‘.conf’ file
  • the service is restarted, readinf the .conf file

All settings not present in the WebUI must go to the associated ‘.conf.local’ file. This is included by the ‘.conf’ file and not altered by the WebUI.

In your case you should put these settings into /var/ipfire/dhcp/dhcpd.conf.local
This file isn’t displayed by the WebUI.

What do you actually intent to do? There is no need to edit the dhcpd config file for any changes. The web ui has got that function. The config is ony loaded when the deamon is getting started. So to take effect on any changes you need to restart the deamon to reload the config file. That’s what the web ui does if you save changes for the dhcp.

Sometimes you will see outdated information because of your browser cache. So you will need to reload the whole website.

I have to create a lot of fixed dhcp entries. So my intention was to edit the dhcpd.conf file which would be a lot faster than creating the entries with the webui. But this seems not to be an option.
Thank you for your answers!

There is an option.
You can edit /var/ipfire/dhcp/fixleases.
But you should do it carefully. The meaning of the fields can be guessed from the already defines leases in the WebUI.

In case of dhcpd Ipfire splits the config in ‘settings’ and ‘fixleases’ ( and ‘advoptions*’ ).

Ah OK I did the same. The easiest way is to download the file to your PC via SFTP and edit it there, but it’s not all about dhcpd.conf. You will also need to edit the file “fixleases”.

When you copy your edited files back make sure the user “admin” is still allowed to read/write the files. Otherwise you will have the problem that you can’t make any changes to them via the web ui anymore.

Hi Bernhard,
cool, that is the solution. It is enough to edit the fixleases. When webui is reloaded it also generates the dhcpd.conf. :slightly_smiling_face:
That’s what I wanted. :+1:

Thats not just right. :wink:
You should save the dhcp settings in the WebUI. Just reloading the page doesn’t rewrite dhcp.conf.

FYI: the format of the fixleases file is:
<MAC addr>,<fixed IP>,<on/off>,<next server>,<file name>,<root-path>,<remark>

I’ve just tried it again. I edit the fixrelease in editor an upload it to ipfire. The I press F5 in webui, the new entries are shown in webui and they are also created in the dhcpd.conf. Perhaps the write process is triggered by reloading the page in browser?

If you just did a ‘save’ or ‘enable/disable toggle’, yes. :slight_smile:

1 Like