OPNsense Forum

English Forums => 26.1, 26,4 Series => Topic started by: DaElephant on July 11, 2026, 03:22:51 PM

Title: How reliable is Firewall:Dianostics:States for troubleshooting
Post by: DaElephant on July 11, 2026, 03:22:51 PM
I ask this question because I am seeing odd behaviour there.

I have 2 IP addresses in the same subnet, .5 and .50
The .5 address is matching on the firewall rule that has .50 in it, not .5.  The .5 IP should match a rule further down the rules list for that subnet.

I cleared the state table but the exact same issue came back.


Side note
Another odd thing in Firewall:Dianostics:Aliases it is listing Aliases that no longer exist.  They did exist at one point but have been deleted or renamed, but still show.
Title: Re: How reliable is Firewall:Dianostics:States for troubleshooting
Post by: Patrick M. Hausen on July 11, 2026, 03:42:37 PM
Show the rules, please. Educated guess: you have the netmasks/prefix-lengths wrong so the rule matches more than intended. To match a single IP address use /32.
Title: Re: How reliable is Firewall:Dianostics:States for troubleshooting
Post by: pfry on July 11, 2026, 03:51:14 PM
Quote from: DaElephant on Today at 03:22:51 PM[...]The .5 address is matching on the firewall rule that has .50 in it, not .5.  The .5 IP should match a rule further down the rules list for that subnet.

I cleared the state table but the exact same issue came back.

It's possible you've encountered a bug (either in rule evaluation or state display), but chances are you've got a rule logic error. We'd need to see the relevant information (rules, aliases, state display, etc.) to be sure. Putting the data together might reveal the issue (or not).

Quote[...]Another odd thing in Firewall:Dianostics:Aliases it is listing Aliases that no longer exist.  They did exist at one point but have been deleted or renamed, but still show.

I'd assume that's because pfctl will show the (now-) empty tables, but I'd have to test it to be sure.