DHCP Option 66, how?


#1

Hi,

I’m working on fully moving from my router to Pi-Hole’s own DHCP server. But one required feature is Dhcp option 66. This option allows devices to be redirected to our FreePBX server which will give our Voip phones its configuration.

My question is where and how do I set that up? I have looked in DHCP Advanced section but it is not there.

Look forward to your ideas for this problem.


#2

You’d have to add

dhcp-option=66,"192.168.1.254" to /etc/dnsmasq.d/02-pihole-dhcp.conf

where 192.168.1.254 is the IP of your TFTP server.

One thing to keep in mind:

This is not a default parameter that is set by Pi-hole.

If you change ANY (DHCP Related) settings via the Admin interface, after you added this entry to the file, you will lose the custom entries in it.


#4

Thanks!

the file named ‘02-pihole-dhcp.conf’ doesn’t exist. There is a ‘01-pihole.conf’ though. Should I go ahead and create a new one by using the file name that you suggested?

Then, I will chmod +x then?


#5

This file is generated by Pi-hole when you activate the DHCP server on the admin page.

It stores the DHCP parameters (range, lease time, DNS, 66) and will only be available while DHCP server option is enabled.


#6

Here’s someone that got it working. See if this helps.

Looks like you can create a standalone file and leave the 02-pihole-dhcp.conf untouched.


#7

Thanks. But I don’t need the dhcp-boot=pxelinux option because I want the IP phones to go to the FREEPBX server to grab their configurations instead of grabbing a boot file.

Do I use 10-ftp.conf in etc/dnsmasq.d/ , which I assume will be permanent (i.e. won’t be deleted when the pi-hole DHCP server isn’t used) ? If so, it would be a far better option because I am happier to keep using my router’s DHCP server. Is my thinking right?


#8

It’s not possible to broadcast DHCP options from a server that is not managing the DHCP service. Just go ahead, enable Pi-hole’s DHCP server and put your option 66 setting in some file like /etc/dnsmasq.d/66-option.conf