[Dnsmasq-discuss] Feature Request: Enhanced Dnsmasq Logging for Blocked Domains

Ercolino de Spiacico bellocarico at hotmail.com
Sat Feb 15 18:04:36 UTC 2025


Subject: Feature Request: Enhanced Dnsmasq Logging for Blocked Domains

In the context of ad blocking, we're receiving increasing requests from 
users for a way to log only blocked domain resolutions.

Currently, the only method to log such information is running dnsmasq in 
debug mode.  However, this generates a large volume of data, including 
logs of successful resolutions, making it difficult to isolate blocked 
domains.

We propose a new option to refine domain resolution logging.  One 
potential implementation, which we'll call --log-locally-defined in this 
example, would allow logging of name resolutions that match locally 
defined directives, such as:

Matching Criteria (any combination):

     * (all the locally defined domain resolution mapping)
     LOCAL=/domain/
     ADDRESS=/domain/ip_address
     SERVER=/domain/ip_address
     A specific IP address (e.g., 0.0.0.0 or the IP of a designated 
blackhole server).
     NXDOMAIN by configuration

This list may not be exhaustive, but it should encompass most locally 
defined blocking mechanisms.

Ideally, the option would support regular expressions for more flexible 
configuration.  While this would be beneficial, it's not a strict 
requirement.

We'd like to know if this feature is feasible and whether the dnsmasq 
project sees value in this approach.  Are there alternative, more 
efficient ways to achieve logging of only blocked domains?

Thank you for your time and consideration.



More information about the Dnsmasq-discuss mailing list