OPNsense Forum

English Forums => General Discussion => Topic started by: shekles on November 30, 2021, 06:11:38 PM

Title: Enabling firewall rules from command line
Post by: shekles on November 30, 2021, 06:11:38 PM
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?
Title: Re: Enabling firewall rules from command line
Post by: 3x3cut0r on October 18, 2022, 11:33:14 AM
Hi,
same question here!
I want to enable/disable a firewall rule with cron. Is this possible?