Is it possible to bulk load hosts and static leases

I am new to IPFire but am generally advanced with my router, firewall and Linux knowledge.

Is it possible to bulk load Hosts and static leases? I can extract the files from my current router and can format them the same as /var/ipfire/main/hosts and /var/ipfire/dhcp/fixleases. If I then edit an entry in the web interface, will it trigger a bulk reload or do I also have to sort out /var/ipfire/dhcp/dhcpd.conf or is there a program I can call to activate the files? Or is there another procedure?

If you manage to modify /var/ipfire/main/hosts and /var/ipfire/dhcp/fixleases according to the syntax used, this changes can be added to the system by

  • calling ‘save’ on the dhcp page ( fixleases )
  • toggling a host ( dummy? ) on the hosts page

This is what I can see in the source with a quick reading.

1 Like

Thanks. I’ve just been playing with the fixed leases and “edited” and saved a lease and this regenerated the /var/ipfire/dhcp/dhcpd.conf file. I then tried your suggestion of just changing something in the top section and saving that and it also worked.

One thing I did notice is that the Webconfig should really do a refresh to the page once you do a submit or something like that so that if you then refresh the page yourself it does not try to re-submit your last save.

BTW, where are the sources for all this? My background is huge usage of ClearOS and part time development and bug fixing of it. I can read some code but never class myself as a proper programmer.


The sources of the WebUI are located in /srv/web/ipfire/cgi-bin.

1 Like

Thanks. Perl. I’ve never really played with perl. I had to update one ClearOS perl script once, but most of their stuff is PHP and bash.

python, bash and C as well. If you need software that is not packaged, this is the documentation for developers (which could be improved). This is the github mirror, if you want to have a look at the code.

1 Like