From owner-freebsd-questions@FreeBSD.ORG Mon Mar 21 07:13:18 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A042116A4CE for ; Mon, 21 Mar 2005 07:13:18 +0000 (GMT) Received: from ns.mccme.ru (ns.mccme.ru [62.117.108.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A375C43D3F for ; Mon, 21 Mar 2005 07:13:17 +0000 (GMT) (envelope-from emin@mccme.ru) Received: from mccme.ru (IDENT:root@mccme.ru [62.117.108.7]) by ns.mccme.ru (8.12.10/8.12.10) with ESMTP id j2L7JOEe081555; Mon, 21 Mar 2005 10:19:24 +0300 (MSK) (envelope-from emin@mccme.ru) Received: from mccme.ru (IDENT:emin@localhost.mccme.ru [127.0.0.1]) by mccme.ru (8.9.3/8.9.3) with SMTP id KAA29658; Mon, 21 Mar 2005 10:13:01 +0300 Date: Mon, 21 Mar 2005 10:12:38 +0300 From: "Eugene M. Minkovskii" To: "Peter N. M. Hansteen" Message-ID: <20050321071227.GA29429@mccme.ru> References: <20050320093159.GA3213@mccme.ru> <861xaamf9t.fsf@amidala.datadok.no> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <861xaamf9t.fsf@amidala.datadok.no> User-Agent: Mutt/1.4.2.1i Organization: MCCME Moscow X-MCCME-Spam: No, score=-0.038 required=5 tests=AWL,FORGED_RCVD_HELO,SPF_HELO_PASS cc: freebsd-questions@freebsd.org Subject: Re: OpenBSD's pf and traffic X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2005 07:13:18 -0000 On Sun, Mar 20, 2005 at 05:51:58PM +0100, Peter N. M. Hansteen wrote: " "Eugene M. Minkovskii" writes: " " > Does any body know, how can I use OpenBSD's pf (packet filter) for " > determine total traffic volume on network interface? If it's " > impossible, what facility you recommend me to do this? " " Various pfctl -s options (eg pfctl -s info) give you counters of bytes " and packets passed or blocked. If you use labels in your pass rules, " you'll get per label counters as well. " Thank you, Peter. So, now I can define rule like block in log on $ext_ip inet from any to $ext_ip label $ext_ip pass in on $ext_ip inet from any to $ext_ip port 22 keep sate As you can see, ssh packets match to all rule and pass in because last rule win. Does it mean, that I can't see ssh's packet using command # pfctl -sl And if I use block in log on $ext_ip inet from any to $ext_ip label $ext_ip pass in on $ext_ip inet from any to $ext_ip port 22 keep sate label $ext_ip ... I see label twice ? Perhaps you know where I can find workable example of this? -- Sensory yours, Eugene Minkovskii Сенсорно ваш, Евгений Миньковский