Project

General

Profile

Actions

Feature #1904

closed

DHCP server doesn't allow arbitrary config blocks

Added by → luckman212 about 13 years ago. Updated over 7 years ago.

Status:
Needs Patch
Priority:
Normal
Assignee:
-
Category:
DHCP (IPv4)
Target version:
-
Start date:
08/21/2010
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:

Description

This relates to a few issues already posted:

http://redmine.pfsense.org/issues/764
http://redmine.pfsense.org/issues/765
http://redmine.pfsense.org/issues/834

But, since they've been marked 'resolved' I am opening a new ticket.

It's nice that 2.0 has the ability to add custom options to DHCPd but what we also really need is the ability to create full custom blocks of options (including if statements, etc). The use case here is e.g. IP phones from different vendors that will all be placed on the same subnet or VLAN and each vendor uses differently formatted strings or IPs for the provisioning server. I don't expect that the GUI could ever hope to satisfy everyone's needs but we just need a big text box for "additional advanced configuration" or something like that where we can enter in arbitrary config for dhcpd.

Actions #1

Updated by Chris Buechler about 13 years ago

  • Tracker changed from Bug to Feature
Actions #2

Updated by Chris Buechler about 13 years ago

  • Target version deleted (2.0.1)
  • Affected Version deleted (2.0)
Actions #3

Updated by → luckman212 about 13 years ago

Thank you for updating the ticket -- any comments on whether this feature is under consideration? Maybe even a simple checkbox somewhere in the GUI e.g.

[x] include dhcpd-custom.conf if found

Then if a user creates the /var/dhcpd/etc/dhcpd-custom.conf file, it would be added to the running config during generation (at their own peril of course)

Actions #4

Updated by Chris Buechler almost 9 years ago

  • Status changed from New to Needs Patch
Actions #5

Updated by Roland Kletzing over 7 years ago

I would second that, please add a possibility to add additonal dhcpd.conf options, for example i would like to implement mac whitelisting the following way:

1. generate a allowed-clients.conf by a script to have a huge whitelist of allowed mac-adresses dhcpd would provide an ip for (as in pfsense i can only use the gui to add static leases)
2. make dhcpd use that by include directive and "allow members of..." statement.

example:

dhcpd.conf:

include "/etc/allowed-clients.conf";

<snip>
subnet 10.0.0.0 netmask 255.255.255.0 {
pool {
range 10.0.0.100 10.0.0.200;
allow members of "allowed-clients";
}

option routers 10.0.0.1;
option domain-name-servers 10.0.0.1;

}

allowed-clients.conf
class "allowed-clients" {
match if ( binary-to-ascii(16,8, ":",substring(hardware,1,6)) = "11:22:33:44:55:66" )
or ( binary-to-ascii(16,8, ":",substring(hardware,1,6)) = "11:22:33:44:55:67")
<snipp>
or ( binary-to-ascii(16,8, ":",substring(hardware,1,6)) = "22:33:44:55:66:77");
log(info,concat ("logdebug: hardware=",binary-to-ascii(16, 8, ":", substring(hardware,1,6) ) ) );
}

Actions

Also available in: Atom PDF