Migrating from dnsmasq to ipfire dhcp - cli

Hi,

I will move my dnsmasq (DHCP, DNS) to IPfire.
I’v edit DHCP.conf with my dnsmasq setting - in ipfie-compliant notation:

host fix0 # MariaCallas
{
hardware ethernet 7C:67:A2:A1:FB:A3;
fixed-address 10.10.10.10;
}

But doesn’t work - IPfire-WEB-GUI settings delete all!!; how can I config all my host in a right way to IPfire.
IPfire-Web-GUI is not a good way, because I have to edit 200 Hosts.

Greetings

The dhcp.conf file is created by IPFire based on what is in the various table on the dhcp WUI page.

If you have so many to migrate then you will need to look at creating a script to add them to the /var/ipfire/dhcp/fixleases file.

That is a csv based file.

The first entry is the mac address, the second is the IP, the third is the word on if the entry is enabled and off or blank if disabled.

There are some more commas then which will be related to the next-server, filename and root path but I don’t know what goes where. If you don’t use those entries then you just have 4 commas there. The last entry is the remark section.

If you enter your fixed hosts into that fixleases file then those will be shown in the fixed leases table. Refresh the browser window if you had the dhcp page open when modifying the fixleases file.

Then to get the entries you have placed into the fixleases file to be shown in your dhcp.conf file you need to press the Save button at the bottom of your green and blue dhcp table section at the top of the dhcp WUI page.

I have just tested and confirmed this by adding an additional fixed lease into my fixleases file which showed up in the WUI fixed leases table and pressing the save button then caused it to show up in the dhcp.conf file.

2 Likes

I think you can add them to: /var/ipfire/dhcp/dhcpd.conf.local and they won’t be deleted. Make sure you restart the dhcp server.

That would work as well but then you would not see any of those hosts in the WUI page and all future edits would also have to be done in the console.

3 Likes

Super, perfect, it’s working - Danke
More questing are coming sooner or later :smile:

1 Like

Glad its worked for you. :+1:

The forum is ready for when you have your next questions.

1 Like