Bug 206467 - 520.pfdenied does not reset counters every day
Summary: 520.pfdenied does not reset counters every day
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-01-21 14:35 UTC by Rick Adams
Modified: 2019-01-21 18:08 UTC (History)
1 user (show)

See Also:


Attachments
520.pfdenied patch to add -z flag (766 bytes, text/plain)
2016-01-21 14:35 UTC, Rick Adams
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Adams 2016-01-21 14:35:19 UTC
Created attachment 165917 [details]
520.pfdenied patch to add -z flag

/etc/periodic/security/520.pfdenied produces reports based on /var/log/pf.today and /var/log/pf.yesterday

This implies that the counts in the report are for one day only.

The counter is never reset, so the counts are cumulative and therefore not particularly useful as reported.

Add the "-z" flag to the pfctl command in 520.pf.denied so that the stats are zeroed daily
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-02-09 21:00:55 UTC
A commit references this bug:

Author: lidl
Date: Tue Feb  9 21:00:39 UTC 2016
New revision: 295452
URL: https://svnweb.freebsd.org/changeset/base/295452

Log:
  Zero pf rule counters so daily reports make sense

  Zero pf rule counters so that each daily report lists an absolute
  number of rejected packets, not the total since the last time the
  machine rebooted (or the counters were manually cleared).

  PR:		206467
  Submitted by:	Rick Adams
  Approved by:	rpaulo (mentor)
  Differential Revision:	https://reviews.freebsd.org/D5172

Changes:
  head/etc/periodic/security/520.pfdenied
Comment 2 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-21 18:08:04 UTC
There is a commit referencing this PR, but it's still not closed and has been inactive for some time. Closing the PR as fixed but feel free to re-open it if the issue hasn't been completely resolved.

Thanks
Comment 3 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-21 18:08:30 UTC
There is a commit referencing this PR, but it's still not closed and has been inactive for some time. Closing the PR as fixed but feel free to re-open it if the issue hasn't been completely resolved.

Thanks