TechnitiumSoftware / DnsServer

Technitium DNS Server
https://technitium.com/dns/
GNU General Public License v3.0
3.84k stars 400 forks source link

Feature Request: Blocking Bypass with MAC Address #820

Closed kyeotic closed 6 months ago

kyeotic commented 6 months ago

The current bypass list supports IP Address, but this only works for clients that have a static IP. Supporting MAC addresses would allow us to set bypass for known clients without reserving an IP for them.

ShreyasZare commented 6 months ago

Thanks for the request. The issue with this is that the MAC address of the DNS request is not directly readable from sockets. Also, such a feature would work only if the clients are on the same LAN segment as that of the DNS server. So, such a feature is not feasible to be implemented.

kyeotic commented 6 months ago

That's a bit surprising to hear since pihole exclusively works on MAC addresses, but I understand they have more of a local/LAN focus. Thanks for the quick response 😄

ShreyasZare commented 5 months ago

That's a bit surprising to hear since pihole exclusively works on MAC addresses, but I understand they have more of a local/LAN focus. Thanks for the quick response 😄

Yes, pihole has this feature since they track all LAN clients and match each request with that data. Its easier to do since they have to run only on one platform. Whereas with Technitium DNS, which is using .NET runtime, there is no built-in way to find MAC address and work cross platform. To implement it, OS level calls would be needed so it will need to be done for Windows, Linux and MacOS independently and I do not have any Apple laptop to do such tests. Plus, it will also need to have same thing done for IPv6 which uses Neighbor Discovery instead of ARP so it becomes a bit more complex to implement.

The other thing is that you can already configure Technitium DNS server based on client's MAC address if you use the DHCP server with another scope where you configure reserved lease based on client MAC address. This way, the clients you want to manage will always get an IP allocation on the specific scope and you can then create a group for that IP range to configure blocking options with the Advanced Blocking app.