From owner-freebsd-pf@FreeBSD.ORG Tue Oct 18 06:59:37 2005 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8B7516A41F for ; Tue, 18 Oct 2005 06:59:37 +0000 (GMT) (envelope-from tyler@tylercentral.com) Received: from pd2mo2so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50E7A43D4C for ; Tue, 18 Oct 2005 06:59:35 +0000 (GMT) (envelope-from tyler@tylercentral.com) Received: from pd2mr6so.prod.shaw.ca (pd2mr6so-qfe3.prod.shaw.ca [10.0.141.9]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IOJ00635NFA1I90@l-daemon> for freebsd-pf@freebsd.org; Tue, 18 Oct 2005 00:59:34 -0600 (MDT) Received: from pn2ml6so.prod.shaw.ca ([10.0.121.150]) by pd2mr6so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IOJ0008HNFAX020@pd2mr6so.prod.shaw.ca> for freebsd-pf@freebsd.org; Tue, 18 Oct 2005 00:59:34 -0600 (MDT) Received: from Ubuntu.tylercentral.com (S01060080c86f7208.cg.shawcable.net [70.72.194.29]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0IOJ00G3ZNFA6F@l-daemon> for freebsd-pf@freebsd.org; Tue, 18 Oct 2005 00:59:34 -0600 (MDT) Date: Tue, 18 Oct 2005 00:59:32 -0600 From: Tyler To: freebsd-pf@freebsd.org Message-id: <1129618772.16152.0.camel@Ubuntu.tylercentral.com> MIME-version: 1.0 X-Mailer: Evolution 2.4.1 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: [Fwd: Re: Per Protocol Traffic Accounting] X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 06:59:37 -0000 Hi Travis, > > Thanks for the reply. However I want to capture data for each > protocol. So, I'd like to have data for HTTP, SMTP, POP3, etc. I've > done this before with ipfilter using the "count" command. (Eg. count > in on de0 from any to any proto http ) > > However PF doesn't have the count command. I've set labels on my ACL > entries, however when a new TCP session is established, the flow stays > with the "IN" rule because I'm keeping state on the connection. So > the IN counters show all the bytes Tx'd and Rx'd, and the OUT rule is > 0 because the flow never hits that rule due to keeping the state. > > (Hmm... confusing?) > > I was hoping someone out there has done per protocol accounting with > PF because I can't figure it out. :( > > I've also looked at ntop from a suggestion earlier in this thread. > However I was hoping to find a solution using just PF. > > Tyler > > On Mon, 2005-10-17 at 23:23 -0500, Travis H. wrote: > > > "set loginterface interface > > > > Sets the interface for which PF should gather statistics such as bytes > > in/out and packets passed/blocked. Statistics can only be gathered for > > one interface at a time. Note that the match, bad-offset, etc., > > counters and the state table counters are recorded regardless of > > whether loginterface is set or not. To turn this option off, set it to > > none. The default is none." > > > > > > Otherwise, couldn't you just use the ifconfig stats? I think there's > > a package for exporting this via SNMP, which could be queried using > > ifgraph or rrdtool. > > -- > > http://www.lightconsulting.com/~travis/ -><- > > "We already have enough fast, insecure systems." -- Schneier & Ferguson > > GPG fingerprint: 50A1 15C5 A9DE 23B9 ED98 C93E 38E9 204A 94C2 641B