Can't apply old dnsmasq.d conf into Pi-hole v6 'misc.dnsmasq_lines'

I have two Pi-holes, both now upgraded to Pi-hole v6. One is the main DNS & DHCP server for my LAN, the other just does DNS for a group of WiFi cameras I have (they use the 2nd Pi-hole because I don't want the main Pi-hole being 'spammed' by the cameras).

Previously, on v5, I had a number of /etc/dnsmasq.d/.conf files

One of these used the dhcp-option & dhcp-host commands to set the DNS to be the 2nd Pi-hole for the camera devices only.

In Pi-hole v6, I believe you're now supposed to put the specific dhcp-option & dhcp-host commands into the Pi-hole Settings page titled 'misc.dnsmasq_lines'.

However, whenever I paste in the relevant lines & press the 'Save & Apply' button, it generates an error (as shown in the attached image):

Invalid configuration
dnsmasq: duplicate dhcp-host IP address 192.168.68.123 at line 230 of /etc/pihole/dnsmasq.conf.temp: "dhcp-host=60:FB:00:82:19:C4,192.168.68.123,cam-v380frontbed,set:piholev6"

It won't let me save the edits.

Do I need to delete something somewhere to allow these edits to be Saved & Applied ?

I think I've figured out the reason, it's because the WiFi cameras MAC & IP's are also defined in the 'dhcp.hosts' settings (ie. in the set of Static DHCP IPs).

Pi-hole v5 never had a problem with the MAC/IP's in the Static DHCP list & also defined in the /etc/dnsmasq.d/*.conf files

I do find Pi-hole v6's management of Static DHCP IP's to be somewhat 'painful' :frowning:

Those contain quite a few lines, if I recall correctly.

Remove any related lines from misc.dnsmasq_lines

Instead, you can keep using your custom files if you enable misc.etc_dnsmasq_d, see also V6 - Post release fixes and findings.

Just make sure the files exist under /etc/dnsmasq.d/, and Pi-hole has permission to access them.

1 Like

Thanks for the help.

Actually I did the opposite - I added the few lines I wanted to misc.dnsmasq_lines in Pi-hole v6 & just abandoned the /etc/dnsmasq.d/*.conf files. That seems to have done what I wanted (which was basically to give my WiFi cameras a different DNS host to the rest of my LAN).

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