Setting up a little bit more sophisticated time schedule

Hi there!

Although having searched thoroughly, I couldn't find an answer to the following question:
Is it possible (maybe with an extra package) to define a bit more sophisticated time schedules to be used in firewall rules?

My kids have scheduled internet access depending in whether there's school the next day. So a basic Sun-Thu and Fri-Sat rule doesn't cover all the vacations and all.

Plus, I'd try to avoid hard coding the schedule on every rule, because I might want to change the schedule at some time and don't want to change twenty rules or so. Putting them in a different zone and rejecting traffic is also no solution, since they should still be able to use locally hosted services.

Does anyone know of such a functionality? Or do I have to script it and change the rules via cron?

Regards
ph0x

Basically:

Are you asking OpenWrt to somehow input your children's school calendar?

If so, where is the sophisticated calendar data to input?

Are you asking the OpenWrt to know national holidays?

("What nation" instantly comes to mind?)

Script that talks to Google calendar could work. Then switch the rules on and off based on the calendar entries.

Edit - found this via Google. Parsing a csv from a bash script wouldn't be too difficult. Simplifies the script some degree.

2 Likes

I'd input the holidays myself, no matter the format. So there doesn't have to be an automated feed-in.
The question aims more for the connection between rules and a predefined timeset, rather than hard coded times per rule.

I'm evaluating migration from pfSense to OpenWrt, and there I can define time presets, that a certain rule should obey to.
But I have also no problem with a script based solution.

I just don't want to go down a self scripted route if there's already a good solution that I just don't know of.

1 Like