OPNsense Forum

English Forums => 26.7, 26.10 Series => Topic started by: wiring8228 on September 19, 2026, 11:46:34 PM

Title: [PARTSOLV] Firewall Aliases – Function of Statistics Option
Post by: wiring8228 on September 19, 2026, 11:46:34 PM
What does the 'Statistics' option, which has the description 'Maintain a set of counters for each table entry', actually do? Which counters is it referencing?

I can't see any change in Diagnostics > Aliases when I activate this option for an alias.
The following is the only documentation I could find about it: https://docs.opnsense.org/manual/diagnostics_firewall.html#aliases
Title: Re: Firewall Aliases – Function of Statistics Option
Post by: pfry on September 20, 2026, 12:39:12 AM
It only counts pass matches... most of the time. I don't think I ever characterized it fully, and I've forgotten the details. How are the aliases you are testing applied?
Title: Re: Firewall Aliases – Function of Statistics Option
Post by: Seimus on September 20, 2026, 12:44:45 AM
The counter increases only for non Port based aliases.

Regards,
S.
Title: Re: Firewall Aliases – Function of Statistics Option
Post by: wiring8228 on September 20, 2026, 05:39:20 PM
I'm using a GeoIP alias that gets used in firewall rules to only allow traffic to some countries (whitelist principle).
Title: Re: Firewall Aliases – Function of Statistics Option
Post by: wiring8228 on October 07, 2026, 09:53:12 PM
So, what could the Statistics option be useful for? I asked AI about it, and now I think I understand that the counters simply keep track of how many times packets were passed or blocked using the alias where the Statistics option is enabled.

Do you perhaps have a correction or a better explanation for this?
Title: Re: Firewall Aliases – Function of Statistics Option
Post by: Patrick M. Hausen on October 07, 2026, 10:31:58 PM
Quote from: wiring8228 on October 07, 2026, 09:53:12 PM[...] the counters simply keep track of how many times packets were passed or blocked using the alias where the Statistics option is enabled.

Exactly.
Title: Re: [SOLVED] Firewall Aliases – Function of Statistics Option
Post by: wiring8228 on October 08, 2026, 07:47:19 PM
As a test, I enabled the Statistics option for a URL table alias that has a blocking rule set for outbound traffic.

So I simply pinged one of these blocked addresses, which was blocked as shown in Firewall Live View.
However, when I go to Firewall --> Diagnostics --> Aliases, neither the packet nor the byte counters for that address have increased.

IP address range from alias: 1.10.16.0/20
IP address pinged: 1.10.16.1
Title: Re: [PARTSOLV] Firewall Aliases – Function of Statistics Option
Post by: pfry on October 08, 2026, 08:40:07 PM
As I said, it appears to count pass matches (specifically matches that create a session/state). I only investigated in an offhand fashion a couple years ago, so feel free to correct me.
Title: Re: [PARTSOLV] Firewall Aliases – Function of Statistics Option
Post by: Seimus on October 08, 2026, 08:55:57 PM
Did you in the tabulator UI put all the statics fields?

Because by default only some are shown, other you need to enable to be visible on the page.

Regards,
S.