Cannot match API getRule state to Firewall Rule in GUI

Started by jonny5, August 13, 2024, 11:40:03 PM

Previous topic - Next topic
In my Syslog output, it seems filterlog/firewall applied a simple numeric to the 'rule' and 'subrule' elements

In the API output, each rule has a UUID and I get them at /diagnostics/firewall/listRuleIds then query the rule's elements at /firewall/filter/getRule?{UUID} and for the output below I've summarized the output as it doesn't seem like the rule data matches what is in the GUI for OPNSense? These are some of the default rules, but, their data all says Pass and that does not make sense to me as the first four are block rules.

3c2cd03c70091e3732710e44c3b97506 named Block bogon IPv4 networks from WAN is...
['action pass Pass',
'direction in In',
'ipprotocol inet IPv4',
'protocol any any',
'gateway  None']
57401c13616c94401fc89cafa777581e named Block bogon IPv6 networks from WAN is...
['action pass Pass',
'direction in In',
'ipprotocol inet IPv4',
'protocol any any',
'gateway  None']
1072878c6245b52440bc89c6107a9d0a named Block private networks from WAN is...
['action pass Pass',
'direction in In',
'ipprotocol inet IPv4',
'protocol any any',
'gateway  None']
dcde0621a9f0daa594b014e15f65c076 named Block private networks from WAN is...
['action pass Pass',
'direction in In',
'ipprotocol inet IPv4',
'protocol any any',
'gateway  None']
5ddcbf1f0688962629f1a2166ba2ab0c named CARP defaults is...
['action pass Pass',
'direction in In',
'ipprotocol inet IPv4',
'protocol any any',
'gateway  None']
846c09139ef5484c01967052b15e454a named CARP defaults is...
['action pass Pass',
'direction in In',
'ipprotocol inet IPv4',
'protocol any any',
'gateway  None']


In the end, I am after a method to match the rule+subrule to a UUID, so that I can label my rules in my Syslog output/Kibana so that it shows the firewall histogram w/Rule naming context?
Custom: ASRock 970 Extreme3 R2.0 / AMD FX-8320E / 32 GB DDR3 1866 / X520 & I350 / 500GB SATA