From owner-freebsd-pf@FreeBSD.ORG Tue Oct 18 16:02:15 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 357AA16A445 for ; Tue, 18 Oct 2005 16:02:15 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6351743D46 for ; Tue, 18 Oct 2005 16:02:14 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3EB48.dip.t-dialin.net [84.163.235.72] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML25U-1ERtum2r4e-0006gL; Tue, 18 Oct 2005 18:02:12 +0200 From: Max Laier To: freebsd-pf@freebsd.org Date: Tue, 18 Oct 2005 18:03:13 +0200 User-Agent: KMail/1.8.2 References: <1129618772.16152.0.camel@Ubuntu.tylercentral.com> In-Reply-To: <1129618772.16152.0.camel@Ubuntu.tylercentral.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1702010.dgCneBN5iy"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510181803.25142.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Subject: Re: [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 16:02:15 -0000 --nextPart1702010.dgCneBN5iy Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Take a look at net/pfflowd - it converts pf-states to Cisco NetFlow datagra= ms. =20 There are plenty of tools to graph the result. Alternatively, you can just= =20 put a bpf-consumer to pfsync0 and interpret the state changes accordingly. On Tuesday 18 October 2005 08:59, Tyler wrote: > 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. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1702010.dgCneBN5iy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDVRzNXyyEoT62BG0RAhHeAJ91US+zYvt6i+gkE6HN9I3imqCwgwCdEmZQ dLX/JLTpHVdmAWWAQgguwmc= =JOsY -----END PGP SIGNATURE----- --nextPart1702010.dgCneBN5iy--