From owner-freebsd-current@FreeBSD.ORG Thu Nov 25 14:12:43 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3A87416A4CE for ; Thu, 25 Nov 2004 14:12:43 +0000 (GMT) Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64A7B43D48 for ; Thu, 25 Nov 2004 14:12:42 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (root@cell.sick.ru [217.72.144.68]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id iAPECed6078628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Thu, 25 Nov 2004 17:12:41 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id iAPECdrl078408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 25 Nov 2004 17:12:40 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id iAPECdxq078407; Thu, 25 Nov 2004 17:12:39 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Thu, 25 Nov 2004 17:12:38 +0300 From: Gleb Smirnoff To: David Schwartz Message-ID: <20041125141238.GB78210@cell.sick.ru> References: Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Virus-Scanned: clamd / ClamAV version devel-20041013, clamav-milter version 0.75l on 127.0.0.1 X-Virus-Status: Clean cc: "freebsd-current@FreeBSD. org" Subject: Re: RFC: Add creation time to dynamic firewall rules X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 14:12:43 -0000 On Wed, Nov 24, 2004 at 01:12:28PM -0800, David Schwartz wrote: D> FreeBSD does not keep track of the time a dynamic firewall was created in D> the structure associated with that rule. It looks like it would take less D> than an hour to code up a patch to keep this information and add a flag to D> ipfw to display how many seconds old the rule is instead of the usage time. D> D> I want this addition for two reasons: D> D> 1) Being able to know how old a connection is gives you important D> information about its stability. D> D> 2) By dividing the number of bytes by the connection age, you can D> guesstimate the approximate bandwidth usage of the connection. D> D> I could easily make this change locally and maintain it as a local patch, D> but would prefer to see it accepted into the general distribution. Does D> anyone have any comments as to whether such a patch would be likely to be D> accepted? D> D> The cost is, essentially, an extra 4 bytes for each dynamic firewall rule. D> A large firewall might have 10,000 dynamic rules, which would be 40Kb. A D> typical firewall might have 300, which would be 1Kb or so. (It might D> actually be a bit more or less, I haven't looked at slack space.) This is not answer to your question, but you can obtain such information for all running network flows if you run ng_netflow. NetFlow is a standard tool for monitoring. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE