Enabling firewall rules from command line

Started by shekles, November 30, 2021, 06:11:38 PM

Previous topic - Next topic
Hey folks,

Is there a way to enable or disable firewall rules from a command line on the router instead of through the web interface?

Use case: I have some firewall rules that activate on a schedule for a window of time. If I don't need them active for the entire duration of that window, I can manually disable the rules to get my original behavior back. However, I have to remember to go re-enable those rules outside the schedule window, which is something I often forget to do. It would be perfect if I could re-enable them from cron when I know it's outside the schedule, for example.

Is this possible?

Hi,
same question here!
I want to enable/disable a firewall rule with cron. Is this possible?
OPNsense 23.7 VM  <=  DrayTek Vigor 165 (vDSL2 35b 250/50)
         \/
on Proxmox 8.0
         \/
on Minisforum HM90