RFC: Scheduled Unbound DNSBL policies — firewall schedules, Cron, or a schedular

Started by joelmnz, Today at 06:31:42 AM

Previous topic - Next topic
We would like to contribute scheduled activation of individual Unbound DNSBL policies. This would be very useful in scenarios like blocking wildcard social domains except during lunch breaks and after hours for certain VLANs for instance.

Before choosing an implementation, we would appreciate guidance on how scheduling should fit the current OPNsense architecture.

The obvious options seem to be:

  • reuse the existing Firewall → Advanced → Schedules objects;
  • expose DNSBL policy enable/disable through configd and use the existing Cron scheduler;
  • or, if the existing firewall scheduling mechanism is considered legacy or too firewall-specific, consider whether this use case points toward a more general schedule service that could eventually be consumed by multiple OPNsense subsystems.

We would prefer to align with the project's intended direction before beginning implementation, particularly to avoid implementing a Cron-based solution that would later need to be replaced by shared schedule support if that is the projects intended direction

Therefore, we have the following questions:

  • Are the existing firewall schedule objects intended to be reusable outside firewall rules?
  • If not, is configd/Cron the preferred mechanism for scheduled service behaviour today?
  • Would a reusable/general schedule abstraction be desirable, or would that be too broad a change for this feature?

Appreciate your guidance on this.