From owner-freebsd-questions Thu Mar 13 20:10:20 2003 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 E03B537B401 for ; Thu, 13 Mar 2003 20:10:18 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 40ABC43F75 for ; Thu, 13 Mar 2003 20:10:17 -0800 (PST) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr364-a29.otenet.gr [195.167.109.61]) by mailsrv.otenet.gr (8.12.8/8.12.8) with ESMTP id h2E4A8cx004953; Fri, 14 Mar 2003 06:10:10 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.8/8.12.8) with ESMTP id h2E4A7rC005701; Fri, 14 Mar 2003 06:10:07 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.8/8.12.8/Submit) id h2E4A1Dq005700; Fri, 14 Mar 2003 06:10:02 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 14 Mar 2003 06:10:01 +0200 From: Giorgos Keramidas To: Grant Peel Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ipfw Message-ID: <20030314041001.GD44683@gothmog.gr> References: <002901c2e996$31a50620$6401a8c0@grant> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002901c2e996$31a50620$6401a8c0@grant> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2003-03-13 14:24, Grant Peel wrote: > I am in a quandry with my colo providers. They have an interface to > mrtg, but that only shows me the bandwidth for all servers on my > connection. > > Does anyone know how to setup ipfw to monitor, and show bandwidth > statistics for individaul ip s on one machine? > > I am reading the man page, but its a little cryptic. You could always insert rules like this in your chain: ipfw add 1000 count ip from any to 10.0.0.1 in recv fxp0 ipfw add 1000 count ip from any to 10.0.0.2 in recv fxp0 Then, every packet that matches the rule will increase the hit count of the rule. You can use `ipfw show' to view the counters, grep for the rule you're interested and pipe the numbers to mrtg for making pretty graphs out of the numbers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message