From owner-freebsd-questions@FreeBSD.ORG Sun Jan 18 10:26:10 2004 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 54A0716A4CE for ; Sun, 18 Jan 2004 10:26:10 -0800 (PST) Received: from munk.nu (mail.munk.nu [213.152.51.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0594E43D4C for ; Sun, 18 Jan 2004 10:26:08 -0800 (PST) (envelope-from munk@munk.nu) Received: from munk by munk.nu with local (Exim 4.30; FreeBSD) id 1AiHcc-000NiB-OK; Sun, 18 Jan 2004 18:26:06 +0000 Date: Sun, 18 Jan 2004 18:26:06 +0000 From: Jez Hancock To: Grant Peel Message-ID: <20040118182606.GB85726@users.munk.nu> Mail-Followup-To: Grant Peel , freebsd-questions@freebsd.org References: <002401c3dd21$cdbe83e0$6501a8c0@grant> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <002401c3dd21$cdbe83e0$6501a8c0@grant> User-Agent: Mutt/1.4.1i Sender: Jez Hancock cc: freebsd-questions@freebsd.org Subject: Re: IPFW and IP Statistics. 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: Sun, 18 Jan 2004 18:26:10 -0000 On Sat, Jan 17, 2004 at 12:46:12PM -0500, Grant Peel wrote: > Hello, > > I am currently using ipfm (IP FLow Meter) as a way of measuring bandwidth > per IP. I am not too happy with it as it has some major limitations. > > Is there a way to configure IPFW in FreeBSD so that all it does is monitor > bandwidth per IP and writes simple stats to seperate files? > > I am interested to hear other solutions (short of buying a router!). This is 'another' solution which logs and displays bandwidth consuption on a per-user basis using ipfw: http://ipfwstats.sf.net/ You should however be able to make ipfw log traffic on a per-ip basis using rules such as: add 100 count ip from any to 1.2.3.4 add 101 count ip from 1.2.3.4 to any ... etc and then at the end of each day run a script via cron to pipe the traffic usage for each ip to a file or database. I have a feeling there's also a few ports that do per-ip bandwidth logging, iplog and ipfm are two that I know of, looking in /usr/ports/net there appear to be others - ipacctd for example. It might be worth using the portsearch tool to search for more - it's in /usr/ports/Tools/scripts/portsearch - something like this: portsearch -p /usr/ports/net -i "bandwidth|traffic" or just have a look through the ports in /usr/ports/net :P -- Jez Hancock - System Administrator / PHP Developer http://munk.nu/ http://jez.hancock-family.com/ - Another FreeBSD Diary http://ipfwstats.sf.net/ - ipfw peruser traffic logging