Time based and device based block


#1

I’m dreaming of block based on specific device but also on time.

E.g block one client (AppleTV) from 22:00 to 09:30

but also with usage blocks, e.g AppeTV used for 1H then block all traffic on this device for the next 30 minutes and so in a loop.

For the first e.g I have a similar option with my router (Synology) but I can’t use it because it’s overwrite every Forwarding DNS of every clients on the same subnet


#2

Unfortunately, this is technically impossible with the underlying DNS resolver, dnsmasq. Blocked queries are served from the DNS cache which is neither selective for individual clients nor time intervals. Please submit such a feature request to the dnsmasq mailing list (adding HOSTS entries that are only applied to clients with certain DHCP tags). We decided to not do such modifications in the original dnsmasq code ourselves as this might lead to incompatibilities that would prevent us from updating our resolver to newer dnsmasq releases in the future.


#3

I am working on a tool to do this via the api…


#4

Do you keep in account that a device is caching and if you switch off access to the DNS server it could still resolve domains on itself as long the TTL has not timed out.


#5

Yes, but eventually it will time out… I’m pretty sure that you can change the TTL in configuration files?