OPNsense Forum

English Forums => 25.1, 25.4 Series => Topic started by: mmjoy99sk on June 25, 2025, 08:32:48 AM

Title: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: mmjoy99sk on June 25, 2025, 08:32:48 AM
As the title says, I have 3 OPNSense firewalls running on 3 different platforms, all are OPNsense 25.1.9_2-amd64 version. I cannot add/edit/clone any rule under Firewall - Automation - Filter. When I click on "+" button, nothing happens. Same on edit/clone.
I used vicuna theme, switched to opnsense just to see if it makes any difference - it does not.
I have also checked developer tools - but clicking on those buttons does not generate any action.

I have tried varius browsers on my mac (chrome, chrome incognito, mozilla, safari) as well as on windows PC (chrome, chrome incognito, mozilla) and they all have the same behavior.

Adding rule under Firewall - Rules - ... works without any issues.

Anyone else experiencing the same? What am I missing?
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: Monviech (Cedrik) on June 25, 2025, 10:46:40 AM
Hello, we can recreate the issue and look into it. Thanks.
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: Monviech (Cedrik) on June 25, 2025, 01:28:33 PM
I think we found it.

Can you try this from the SSH shell:

opnsense-patch https://github.com/opnsense/core/commit/b5e0b0b7dcb603d4464f1a3eb6a5491d79b70b0d
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: mmjoy99sk on June 25, 2025, 07:09:58 PM
I did try, got an error:

Fetched b5e0b0b7dcb603d4464f1a3eb6a5491d79b70b0d via https://github.com/opnsense/core
1 out of 1 hunks failed while patching opnsense/mvc/app/views/OPNsense/Firewall/filter_rule.volt

Result is still the same - no rule can be added.
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: Monviech (Cedrik) on June 25, 2025, 07:42:35 PM
My mistake the patch is based on current master and not on the stable branch.

Try this one:

opnsense-patch https://github.com/opnsense/core/commit/1748dd18c3356099a570b008c707d65659e7241f
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: mmjoy99sk on June 25, 2025, 07:50:26 PM
This one worked and i can add rules after. Also edit and clone works.
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: Monviech (Cedrik) on June 25, 2025, 08:10:37 PM
Thanks for reporting and testing this :)
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: mmjoy99sk on June 25, 2025, 08:28:36 PM
Well, thanks for the fix.
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: part_time_nerd on November 17, 2025, 10:07:55 PM
I have pretty much the same problem since I updated from the last 2024 version in several steps to 25.7.7 lately.

The list of rules appears to be empty and they also can not be not found via the API.
They are in my last config dump, however and I restored the router from that dump, sadly to no avail (Filter rules still empty).
None of the patches above do apply for me. What can I do to further diagnose the problem?
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: Monviech (Cedrik) on November 18, 2025, 07:25:27 AM
It requires an interface selection if the rules are not in floating. Maybe thats the issue?
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: part_time_nerd on November 18, 2025, 06:23:29 PM
Oh yes, thank you, I totally missed that change!

All rules are there, once I select the interface.
Now I'll go and see how the api has changed because my external scripts that have worked for years don't find them any longer as well. ;-)

Thanks again!
Title: Re: Unable to add/edit/clone rule under Firewall - Automation - Filter
Post by: Monviech (Cedrik) on November 18, 2025, 06:51:16 PM
The API can take a comma separated string of interfaces ("" empty string is floating). So e.g LAN,,WAN will produce all LAN, Floating, WAN. (search endpoint).