I am running Pi-Hole on my server in a container and want to set up a pxe boot server on order to boot linux Kali.
However, I am new to pi hole and docker. Before I used pihole I was using dnsmasq directly on the server and was able to set it up using this manual https://www.kali.org/docs/installation/network-pxe/
In order to do the same with pihole, how would i do it to add those lines to the dnsmasq.conf?
When creating a custom dnsmasq configuration as suggested by yubiuser, you want to make sure that your options do not conflict with Pi-hole's own.
For the sample from your link, that would probably mean you'd have to strip all lines with interface, dhcp-range and dhcp-option for a start, as those are controlled via Pi-hole's UI.
If you'd need some of those options to coexist with Pi-hole's, you'd have to figure that out for yourself. Refer to dnsmasq's documentation for further option details.
Ok, so if I understand that correctly. I just create a file and call it pxeboot.conf consisting only the tftp server and other pxe configs for dnsmasq. Mount that in the container to /etc/dnsmasq.d/. Then I create mount the necessary files for kali linux in the container and should be good to go?
If that works, is there a way that I could write a small manual for that to be used in the pihole documentation?
pi@ph5b:~ $ man dnsmasq
[..]
-O, --dhcp-option=[tag:<tag>,[tag:<tag>,]][encap:<opt>,][vi-encap:<en‐
terprise>,][vendor:[<vendor-class>],][<opt>|option:<opt-name>|op‐
tion6:<opt>|option6:<opt-name>],[<value>[,<value>]]
Specify different or extra options to DHCP clients. By default,
dnsmasq sends some standard options to DHCP clients, the netmask
and broadcast address are set to the same as the host running
dnsmasq, and the DNS server and default route are set to the ad‐
dress of the machine running dnsmasq. (Equivalent rules apply
for IPv6.)