From owner-freebsd-questions@FreeBSD.ORG Sun Nov 9 04:52:23 2003 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 BEF1B16A4CE for ; Sun, 9 Nov 2003 04:52:23 -0800 (PST) Received: from smtp03.wxs.nl (smtp03.wxs.nl [195.121.6.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD3C94400D for ; Sun, 9 Nov 2003 04:52:22 -0800 (PST) (envelope-from akruijff@www.kruijff.org) Received: from kruij557.speed.planet.nl (ipd50a97ba.speed.planet.nl [213.10.151.186]) by smtp03.wxs.nl (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0HO3009AY515VN@smtp03.wxs.nl> for freebsd-questions@freebsd.org; Sun, 09 Nov 2003 13:51:06 +0100 (MET) Received: from Alex.lan (localhost [127.0.0.1]) by kruij557.speed.planet.nl (8.12.8p2/8.12.8) with ESMTP id hA9CqKZ4000857; Sun, 09 Nov 2003 13:52:21 +0100 (CET envelope-from akruijff@Alex.lan) Received: (from akruijff@localhost) by Alex.lan (8.12.8p2/8.12.8/Submit) id hA9CqJp8000856; Sun, 09 Nov 2003 13:52:19 +0100 (CET) Date: Sun, 09 Nov 2003 13:52:18 +0100 From: Alex de Kruijff In-reply-to: <1068265748.16198.8.camel@gandalf.middle.earth> To: Augusto Jun Devegili Message-id: <20031109125218.GC553@dds.nl> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Content-disposition: inline User-Agent: Mutt/1.4.1i References: <1068265748.16198.8.camel@gandalf.middle.earth> cc: freebsd-questions@freebsd.org Subject: Re: Gateway traffic reporting tool (port) 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, 09 Nov 2003 12:52:23 -0000 On Sat, Nov 08, 2003 at 02:29:08AM -0200, Augusto Jun Devegili wrote: > Hi all, > > I have a small home LAN with four machines. One of them (mine, actually) > runs FreeBSD 5.1 and serves as a NAT/gateway between the LAN and an ADSL > connection. > > I would like a tool for traffic reporting, detailing traffic information > for each LAN computer (by IP or MAC address) so that I know who uses > more bandwidth. This information should be provided on a time interval > basis (e.g., between 2 a.m. and 3 a.m., how much traffic per IP/MAC > address). If possible, I would like to know traffic from my localhost > regardless of what it is forwarding (as it is the default gateway for > the LAN, I don't know if that would be possible). > This can be done with IPA (its in the ports) in combination with IPFW. If you like graphics then you could add MRTG on top of it all. This is how it would look: http://www.kruijff.org/stats/?dir=docs/&file=IP_accounting.txt I have tree articles about how to setup this. These need to read in order. The first is about setting up a simple firewall, the second is to add IPA and the thirth is about adding MRTG. Please contact me if you have trouble with it. -- Alex Articles based on solutions that I use: http://www.kruijff.org/alex/index.php?dir=docs/FreeBSD/