Filter MAC addresses from being answered by PiHole

I have a PiHole setup in my house and have the PiHole DHCP running instead of my router DHCP (as most users do). However, I have some devices that need to specifically NOT pass through the PiHole. These devices can be given a DHCP lease by the PiHole but all DNS requests should go straight to the router and not the PiHole.

Searching for this, I found this thread (DHCP server MAC-address filtering) which has some elements that I think fit my issue but the result isn't what I want.

In simple terms, I want (for example) MAC address AA:BB:CC:00:11:22 to be given a DHCP lease as usual by the PiHole but all DNS requests should go to the router (192.168.1.1 for example)

I suspect a new conf file to be needed in the dnsmasq.d folder (from the other thread) but I am somewhat lost as to what I would need to specify in said configuration file.

A use case for this would be someone in a household regularly needing to access sites tagged as ads by PiHole for work, hence needing unfiltered access to the network.

Thanks in advance to you all (and Merry Christmas)!

Any reason why you are not using Pi-hole's client-based filtering?

Yes, some clients work from home though a company VPN and regularly get different IP addresses (but never a new MAC address obviously). I did use the built in group management initially but had to regularly check for the new IP addresses and add them to the unfiltered group.

Clients on a VPN are not visible on your network and won't use Pi-hole for DNS.

Oh thanks, That solves one of my issues then. Another reason I need to filter this is for my TV (or more specifically my TV provider box). Some shows are available to be watched later via the numerous servers for specific channels but since these servers show adverts halfway through the show, PiHole blocks the whole thing meaning no access to said shows so I'd like to block the MAC address of the TV box from being filtered.

Are those TV devices and your Pi-hole machine all connected directly to your router?

The latest update has added MAC address support for client group management.

Of course, MACs are visible only for same link devices, so this will only work if Pi-hole can actually see your device's MACs.
You should be able to verify this by matching the MAC address of the device in question with an identical MAC entry in Pi-hole's Network overview, or if you can spot the MAC address in Pi-hole's Client group management Known clients drop down box straight away.

1 Like

This seems like the perfect solution honestly! Having looked rapidly, is it possible to specify MAC addresses manually or do I need to use the clients from the drop-down list ?

You should not specify a MAC address that is not included in the drop down list.
At least not until you've verified that the MAC is indeed on the same link as Pi-hole.

If it isn't, MAC based filtering won't work.

1 Like

Perfect, I think I have all I need to at least try to get this all working! Thanks a lot!

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