[SOLVED] Reset firewall hit counters?
-
Is there a simple way, without resetting states, to reset the firewall rule hit/traffic counters that are visible in Firewall > Rules?
In the GUI?
On the CLI? -
@awebster
Hey
Unfortunately, such a feature does not seem to be implemented in pfctl. But you can do it yourself by writing a simple program in C.If you want, I can send you the text of such a program or I can send you a compiled utility.
Before the program starts
[2.4.4-RELEASE][admin@pfSense.localdomain]/tmp: ./pf_clrstat All per-rule statistics cleared [2.4.4-RELEASE][admin@pfSense.localdomain]/tmp:
After
-
You don't need anything other than pfctl -z
before
[2.4.4-RELEASE][admin@sg4860.local.lan]/root: pfctl -z [2.4.4-RELEASE][admin@sg4860.local.lan]/root:
after
-
@johnpoz Yeah, you're right, I didn't see it
-
@johnpoz Thanks, that's exactly what I was looking for!