Exclusion of one host doesn't work

Hi All, i have a problem to exclude one host to the pihole filter.
In my network I have a "powermeter", a little box to misure the
Power consumption in my house. This powermeter leads thousands of requests dns for each hour, and
I would like to exclude it from the pihole filter.
Now, i read the post to do this, but dont' work! :frowning:

I turn on the DHCP server in pihole e turn off the DHCP in the router, I have set all the fixed addresses for my host (also the powermeter) and finally I created a .conf file with the directive
dhcp-option=tag:googlesdns,6,8.8.8.8
dhcp-host=MA:CA:DD:R:ES:SS,set:googlesdns (with the powermeter MAC).

I lowered the lease time to 1 hour, restart the dns services and after 1 day the powermeter
It still requires dns to pihole!

Uh, the powermeter don't have a page to set parameter like dns or other, i can change this setting only with DHCP, but don't work :frowning:

Sorry for my English and thanks for the great work you have done

Are you able to power off the power meter and back on again? I had some wifi lights that I needed to do that for.

Also, are you running DHCP from the router or pihole?

I Power off the powermeter a couple of time and reboot the raspberry.
I use the DHCP from pihole (and turn off the DHCP from router) with fixed ip address.

Now i try to apply this method to another Mac, a laptop.
I added the line dhcp-host=MA:CA:DD:R:ES:SS,set:googlesdns with laptop Mac, reboot DNS services and laptop but nothing, in ipconfig/all the DNS server is always pihole.

If you're wishing to stop measuring the number of calls home by your device, just look under Settings ~> Top Domains/Top Advertisers. This is where you will put the web address that you want to exclude from the list.

I don't actively such things anymore, but I think my configuration looked like this

dhcp-host=11:22:33:44:55:66,hosta,192.168.1.11,infinite,set:red
dhcp-option=tag:red,option:dns-server,8.8.8.8

at least I get this from what I have still in my configuration but what is commented out. Maybe you want to try this variation as well. You will have to have the powermeter reconnect (plug out and back in the Ethernet cable if connected via wire).

Yeeeeah, It WORKS!
I put the directive dhcp-option and the set of the tag in the file created to pihole when i set the static address for every mac (in my case 04-pihole-static-dhcp.conf), restart dns service e reboot the powermeter. (Previously i put this option in a separated .conf file in /etc/dnsmasq.d directory)
Now i have the file 04-pihole-static-dhcp.conf:
dhcp-host=mac,name,ip_address (for every host in my network) dhcp-host=11:22:33:44:55:66,powermeter,192.168.1.x,set:red dhcp-option=tag:red,option:dns-server,8.8.8.8

and the Powermeter is totally disappeared from pihole :smiley:

In conclusion the option to set different DNS to a MAC Address does't work if i put the directive in a separated file (05-bypass.conf in /etc/dnsmasq.d).

It should work, but maybe you had the dhcp-host= setting multiple times for the corresponding device?

Interesting. I'm still playing with dnsmasq to see what all I can do.

If I remember correctly, I believe that it reads the files in reverse order. setting in 10-blah.conf override the settings in 09-blahblah.conf .