Date: Thu, 17 Sep 2009 13:14:02 -0600 From: Tim Hogan <tim@hoganzoo.com> To: Tom Uffner <tom@uffner.com> Cc: freebsd-pf@freebsd.org Subject: Re: Packet Filter alerting system. Message-ID: <4AB28A7A.2060206@hoganzoo.com> In-Reply-To: <4AAFE24A.2040602@uffner.com> References: <4AADC15B.5060501@subisu.net.np> <4AAFE24A.2040602@uffner.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format. --------------ms050806040209080301030403 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Tom Uffner wrote: > Gaurav Ghimire wrote: >> Just curious to know if we have something, some alerting system or >> mechanism that provides the administrator with the daily reports that >> pf itself or some other >> tool collects on pf's behalf. >> >> That probably reports the admin of: >> ~ Total connection counts matched on each rulesets. >> ~ Total number of counts matched on deny rules. > > /etc/periodic/security/520.pfdenied > > it should be enabled by default if you haven't done anything unnatural to > the /etc/periodic system > > > ~ IP/Port attack logs and relatives. > > only if you specify "log" in one or more of your pf rules, in which > case you will find it in /var/log/pflog, /var/log/pflog.?.bz2, and > /var/log/pf.{today,yesterday} > > tom > Not sure if this will help but I have added the following line to /etc/periodic/security/520.pfdenied pfctl -sr -v | grep -v "Inserted:" | awk '/^[apb]/ { printf "\n%s\n", $0 } $0 !~ /^[apb]/' | mailx -s "Daily PF Hit Report" root This will produce something like the following for each rule that you have; pass in quick on vr0 inet proto udp from 10.0.0.1 to 10.0.0.2 port = syslog keep state [ Evaluations: 560355 Packets: 46 Bytes: 4058 States: 0 ] The down side is that the numbers will increment from the last time PF was restarted, not from the previous day. Regards, Tim --------------ms050806040209080301030403 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIK6jCC BXEwggNZoAMCAQICAwcTezANB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FWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1 dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9ydEBjYWNlcnQub3JnAgMHE3swgZMGCyqG SIb3DQEJEAILMYGDoIGAMHkxEDAOBgNVBAoTB1Jvb3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93 d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZQ0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8G CSqGSIb3DQEJARYSc3VwcG9ydEBjYWNlcnQub3JnAgMHE3swDQYJKoZIhvcNAQEBBQAEggEA bwNj0YSnGfrZv1FKVTLjV0ncucrr/Hxp6ah6698qrTyIbl+n1LkJdVnvdNqN5dDMucRtj4/n FMT1cUgwY3HKa8nwSwJR7fKTEB5HkH7NK1XlfT25jzLQTN/5/i4cTNP0byWausiNJPfDnAcF kCyD3Y3/LYdeJpkEjpk9WSIEEJYR/sp/2MQGzPH5LgHoL3FDj6+iVfS/4HHHNBT5BQmFWUY5 KJXm1dUFUg1dNfpOsHF3+oXkLMHRJs9RxZaSiNvbDOdLcDZll4/znsz4XhRhcaYmG5xhiB/Y PXItaXEjyVSr98kWi0horMadb1y/w7sf6x1Jzz7mKeFRXwiiyWyY5gAAAAAAAA== --------------ms050806040209080301030403--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4AB28A7A.2060206>