Hello, members,
Could someone please point me in the right direction for the PHP file name/path of the firewall rule pages.
I would like to replace the default logging icon generated by
fa fa-info-circle fa-fw
with
far fa-info-circle fa-fw
I absolutely have to do it because, being vision impaired, I see no difference between rules that log and those that do not, whereas I have to disable some that do and to enable some that do not.
Thank you for your help!
It is in file /usr/local/www/firewall_rules.php, approximately at line 208. You will need to restart the web ui by "configctl webgui restart" after a file change.
Quote from: meyergru on July 07, 2025, 06:30:13 PMIt is in file /usr/local/www/firewall_rules.php, approximately at line 208. You will need to restart the web ui by "configctl webgui restart" after a file change.
This did it! Much appreciated! Although the glyph is now broken, for reason unknown (which I'll figure out later), but it is distinct and does the trick.
But this leads to another mystery: none of the filters is set to log, but I still have entries in live logging. I made sure that I go through all of the floating/lan/wan/loopback and expand all of the auto-generated, and none is set to log, yet the log is populating.
The entries that I am seeing are on the new gateway that I've just set up and on the loopback. Neither has any filters set to log, and I can't match any by the rid/rulenr from the log entry info.
Any pointers?
The glyph is broken, because "far" is undefined in the styles. Maybe you should leave the enabled version undisturbed and use this instead:
function firewall_rule_item_log($filterent)
{
if (!empty($filterent['log'])) {
return "fa fa-info-circle fa-fw text-info";
} else {
return "fa-regular fa-circle fa-fw text-muted";
}
}
As for the logging: go to "Firewall: Settings: Advanced" and look at the checkboxes for different default rules.
It seems that 'far' is not working because open sense is using V4. But this is fine for now as the non-logging glyph is broken, and the logging glyph immediately jumps out on me.
As to logging, I could not find any logging checkboxes under firewall advanced settings but found them under system settings logging. None is checked off except for log errors from the web server.
No. From all.min.css:
/*!
* Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2024 Fonticons, Inc.
*/
I meant exactly these checkboxes in "Firewall: Settings: Advanced":
2025-07-07 19_07_33-Advanced _ Settings _ Firewall _ OPNsense.mgsoft – Mozilla Firefox.png
Your UI looks different than our router's, and this is likely due to you being on the more recent version, so we are behind and do not have the same features as you. Your settings are under system settings logging, on our router box. Anywhow, your and our settings are the same.
It is true that I use a non-default theme (which should not matter) and I use the most current OpnSense version 25.1.10.
If you use outdated versions, you should state it, see: https://forum.opnsense.org/index.php?topic=42985.0, point 16. Yours must be really ancient.
That being said, "far" does not work on my box with FontAwesome 6.7.1, as well. I only know of fa-regular from the FontAwesome docs - however, the fa-circle is much more distinguished from fa-info-circle anyway.
There must be more places where the logging glyph is defined because when it is being clicked, it reverts back to the original and only uses my changes after the page is refreshed by clicking 'Apply'.
far is supposed to just work, unless FA is locked on V4, according to their web site.
It must be in some of these files where AJAX is defined, for the duration of the turning of the logging on or off:
# grep -r "fa fa-info-circle " /usr/local/opnsense/
/usr/local/opnsense/mvc/app/views/layout_partials/form_input_tr.volt: <i class="fa fa-info-circle text-muted"></i>
/usr/local/opnsense/mvc/app/views/OPNsense/IDS/index.volt: <i class="fa fa-info-circle text-muted"></i>
/usr/local/opnsense/mvc/app/views/OPNsense/IDS/index.volt: <i class="fa fa-info-circle text-muted"></i>
/usr/local/opnsense/mvc/app/views/OPNsense/Firewall/alias.volt: <i class="fa fa-info-circle text-muted"></i>
/usr/local/opnsense/mvc/app/views/OPNsense/Firewall/alias.volt: <i class="fa fa-info-circle text-muted"></i>
/usr/local/opnsense/mvc/app/views/OPNsense/Core/firmware.volt: '<i class="fa fa-info-circle fa-fw"></i></button>' +
/usr/local/opnsense/mvc/app/views/OPNsense/Core/firmware.volt: <td style="width: 150px;"><i class="fa fa-info-circle text-muted"></i> {{ lang._('Usage') }}</td>
Since the last 2x are for the firmware, and the previouse 2x are for aliases, the 1st one sounds like the right candidate.
{% if help|default(false) %}
<a id="help_for_{{ id }}" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a>
{% elseif help|default(false) == false %}
<i class="fa fa-info-circle text-muted"></i>
{% endif %}
Any open sense web developers around who can point me at the right file?
Thanks in advance!