Possible to modify rule based on a schedule?
-
Periodically I change a NAT rule to open a port. I usually remember to close the port when I am done but occasionally I forget. Is there a way, or a package, to modify a rule based on a schedule? For example, at 2:00AM, check to see if a rule is active, and if so, then deactivate the rule...otherwise do nothing.
-
You can put a schedule on a firewall rule:
https://docs.netgate.com/pfsense/en/latest/firewall/firewall-rule-schedules.htmlBut that would require scheduling it enabled too and it doesn't sound like that would fit your usage.
You might be able to just set the rule as disabled using a php shell command/script. Then call that from a cronjob.
https://docs.netgate.com/pfsense/en/latest/development/using-the-php-pfsense-shell.htmlSteve