Firewall log bug - wrong rule listed, states ipv4 when its ipv6, etc.
-
Ok so there is something not right with the firewall logs and how it parses which rule was used
So in the below log and rules, you can see that in the log for the ipv6 block to :123 (that does not match my allow for 123 to my ipv6 box serving up ntp, so it should fall through to the default block. But clearly its IPv6 not ipv4 and lists ipv4 default deny as the rule that blocked it.
But what is stranger is the allows into my ssh box 192.168.1.7:22 yes that should be allowed but its stating the rule that allowed it is the one above the actual allow rule.
Currently using
2.1-BETA1 (i386)
built on Fri Dec 28 20:54:16 EST 2012
FreeBSD 8.3-RELEASE-p5Its a couple weeks old sure, I normally update to new snap every couple of weekends. But I don't see anything in the rss feed about commits that would fix this.
-
The firewall log display gets the rule number from the log and then looks up the rule number in the current set of pf rules in use. If you make mods to your rules, or have timed rules, or anything to change the current running ruleset, then a display of old log data before the ruleset change will have the mapping between rule number and rule text out-of-date.
There is no database kept of the ruleset in effect at each point in time, so there is currently no way to match up rule numbers in "old" logs with the text of the rule at the time. -
Thanks for the details - that makes sense ;) And yeah I had just added some rules. Will keep an eye on it.