Hi
I'm using filter automation, and while the toggle command seems to be executed, the rule doesn't seem to be really taken into use.
Version: OPNsense 25.1.5_5
Steps:
1, activate rule via API (interface based rule)
2, test rule -> not working
3, check rule is active in the GUI -> yes
4, search the rule in statistics/rules -> rule cannot be found
5, hit Apply button in Automation/Filter without changing anything else and test rule -> now it works
6, search the rule in statistics/rules -> now rule can be found
Anyone else noticed this or using filter automation successfully?
Cheers
Christian
Figured it out.
This is actually how the API seems to work.
You can toggle rules on/off with: /api/filter/toggleRule/{uuid}/0 or 1
But this does not apply the change to the pf.
To achieve this one must: /api/filter/apply
Thought I'd post it here in case someone stumbles over this as well.
on the one hand, that **KINDA** makes sense... (commit / stage -> apply )
because there's likely cases wherein one would want to batch several related-but-isolated alterations.... and apply them once....
and I agree that it's .... surprising if ya don't know about it...
is there any mention of this in the docs?
It shouldn't that surprising given it's the way the GUI works in various places, in particular FW rules...