DHCP option 66 (TFTP)

can this 02-pihole-dhcp.conf work?.

I add the line option 66 but not sure of sintax:

> ###############################################################################
> #  DHCP SERVER CONFIG FILE AUTOMATICALLY POPULATED BY PI-HOLE WEB INTERFACE.  #
> #            ANY CHANGES MADE TO THIS FILE WILL BE LOST ON CHANGE             #
> ###############################################################################
> dhcp-authoritative
> dhcp-range=192.168.1.100,192.168.1.249,24h
> dhcp-option=option:router,192.168.1.10
> dhcp-option=option:66,192.168.1.4
> dhcp-leasefile=/etc/pihole/dhcp.leases
> #quiet-dhcp
> 
> domain=local

As the file states you shouldn't modify it directly, but you can certainly add your own custom config files to supplement.

can you guide me what is the corect file / path to modify to add option 66 to pihole DHCP config at start?

It should work if you create a file like /etc/dnsmasq.d/10-my.conf with your own configuration settings. Then restart dnsmasq.

1 Like

Yep, it can basically be any number-text.conf file but they are read in lexicographical order so Pi-hole's configs need to be first to prevent yours overwriting ours.

OK I create a new file "10-personal.conf" whit this line:

dhcp-option=option:66,192.168.1.4

and restart dhcp from pi-hole webGUi, and still my tftp server is not detected, someone have a workinkg tftp server working in pi-hole?, and can tell me if my line is correct?.

option 66 is to say that my Tftp server is on 192.162.1.4 (not in the same ip that pi-hole run), but actually I not sure if "dhcp-option=option:66,192.168.1.4" is correct or perhaps "dhcp-option=66,192.168.1.4" is the correct syntax

OK, creation of suggested file works, i'll notice that DHCP do not work when I try to test some parameters because DHCP crash, but I'll try all conbinations possible and only a few do not crash DHCP so I supposse that this are the correct, but still no luck to boot from tftp server on 192.168.1.4

I'l test:

dhcp-option=150,192.168.1.4

dhcp-option=66,"192.168.1.4" <- Notice the quotes.

and this other crash DHCP server:

dhcp-option=option:66,"192.168.1.4"
dhcp-option=66,192.168.1.4

so finally I need help from other user that have a working tftp server configured and working on pi-hole.

Ok, finally after several test I make it working.

the correct syntax is:

dhcp-option=66,"192.168.1.4"
dhcp-boot=pxelinux.0,,192.168.1.4

so you only need to create a file named 10-TFTP.conf on /etc/dnsmasq.d/

and add this lines.

remember to change my 192.162.1.4 IP for your TFTP server IP, and be sure that you have the file pxelinux.0 on the root folder of your tftp server.

I finally find this: https://www.reddit.com/r/pihole/comments/5vshcz/how_to_use_the_pihole_dhcp_server_for_pxe_boot/

to guide me.

Thanks to developers & Moderator for his help.

Please consider to mark as SOLVED this case

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.