Location of Static DHCP Lease File?
-
I would like to add about 55 static DHCP leases into pfSense. Can someone point me to the location of the file so I can add them?
Regards,
Ultrajones -
I found it. Looks like I need to download the DHCP config, add my entries and upload the config.
Regards,
Ultrajones -
Yes, all the settings are stored in config.xml - so yyou need to get the dhcpd section of that and add your static mappings in the same format as an existing one. For example, here is a tpyical DHCPD section of config.xml:
<dhcpd><lan><range><from>10.99.0.200</from> <to>10.99.0.239</to></range> <defaultleasetime><maxleasetime><netmask><failover_peerip><gateway><domain><domainsearchlist><ddnsdomain><tftp><ldap><nextserver><filename><rootpath><dhcpleaseinlocaltime><numberoptions><enable><staticmap><mac>00:9c:02:07:89:1e</mac> <ipaddr>10.99.0.25</ipaddr> <hostname>PRINTER-01</hostname> <filename><rootpath></rootpath></filename></staticmap> <staticmap><mac>00:1d:e0:03:46:21</mac> <ipaddr>10.99.0.81</ipaddr> <hostname>ADMIN-PC-01</hostname> <filename><rootpath></rootpath></filename></staticmap> <mac_allow><mac_deny></mac_deny></mac_allow></enable></numberoptions></dhcpleaseinlocaltime></rootpath></filename></nextserver></ldap></tftp></ddnsdomain></domainsearchlist></domain></gateway></failover_peerip></netmask></maxleasetime></defaultleasetime></lan> <opt1><range><from>10.99.1.192</from> <to>10.99.1.223</to></range> <defaultleasetime><maxleasetime><netmask><failover_peerip><gateway><domain>extralan.mydomain</domain> <domainsearchlist><enable><ddnsdomain><tftp><ldap><nextserver><filename><rootpath><dhcpleaseinlocaltime><numberoptions><staticmap><mac>00:1d:09:56:78:13</mac> <ipaddr>10.99.1.50</ipaddr> <hostname>HR-PC-01</hostname> <filename><rootpath></rootpath></filename></staticmap> <mac_allow><mac_deny></mac_deny></mac_allow></numberoptions></dhcpleaseinlocaltime></rootpath></filename></nextserver></ldap></tftp></ddnsdomain></enable></domainsearchlist></gateway></failover_peerip></netmask></maxleasetime></defaultleasetime></opt1></dhcpd>
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.