Unique DNS Server(s) per DHCP Lease

Hi,

One of the features that most firewall distributions I’ve used have, is the ability to set per static-dhcp-lease specific DNS servers as well.

I want this for home, so I can set my devices to point to the piHole I have setup, so that the kids iPad can use the schoo’s content filtering DNS they have setup, but to ensure that my Wife (who works with online analytics) gets a 100% unfiltered DNS experience.

Is this something there’s plans to add to ipfire in the future - or have I missed where in the GUI this feature is? I can set static DHCP leases no worries, but I can’t then assign those leases DNS servers.

Thanks!
Tim

Just a thought … For the specific devices that are to bypass piHole, you could set static ip address on the device directly (not a DHCP Fixed Lease) – using the IPFire box as DNS server. Of course, you would need to specify ip address outside the range IPFire uses for DHCP (WUI Network ->DHCP Server). You may want to put those devices with static addresses in the hosts table on IPFire (WUI Network -> Edit Hosts).

1 Like

Thanks @cbrown Yes I’ve thought about setting up static entries on the network for my various devices. I just really like having a central place to manage everything, if my wife needs to borrow one of my devices to test with while I’m at work, I just log into the firewall, change the DHCP details and tell her to bounce the Wifi (or kick her off using the Unifi Controller)

I realise this is quite a niche request, pfSense currently offers it and I can also achieve the same with Vyos by manually editing extra options that are put into dhcp.conf.

Thanks for the reply :slight_smile:

Got the same question, I’m running some things which run from an pxe environment at home
Setting the hostname option for fixed leases would be very nice in such envirenments, especially when one wants to centralize some things.

If you have static host entries for the devices I would think you should be able to edit the /var/ipfire/dhcp/dhcpd.conf file and add option 6 for the DNS server and option 12 for the hostname.for each of the static DHCP entries.

I haven’t tried it, just an educated guess.

That could be done but the next time you save anything on the dhcp WUI page all those special additions in dhcpd.conf will disappear. Likely the same when an upgrade to the next Core Update is carried out.

The alternative is that someone with the coding capability and the desire to have those capabilities in the dhcp WUI page can always create a patch for dhcp.cgi and submit it to the development mailing list for consideration and review.
The wiki has a section about providing patches to the source code.
https://wiki.ipfire.org/devel/submit-patches