From owner-freebsd-questions Sun Jan 14 4:14:11 2001 Delivered-To: freebsd-questions@freebsd.org Received: from d9168.upc-d.chello.nl (d9168.upc-d.chello.nl [213.46.9.168]) by hub.freebsd.org (Postfix) with ESMTP id A797737B402 for ; Sun, 14 Jan 2001 04:13:45 -0800 (PST) Received: by d9168.upc-d.chello.nl (Postfix, from userid 1001) id 1B5DD362; Sun, 14 Jan 2001 13:13:44 +0100 (CET) Date: Sun, 14 Jan 2001 13:13:44 +0100 From: Edwin Groothuis To: Len Conrad Cc: freebsd-questions@freebsd.org Subject: Re: ip traffic accounting Message-ID: <20010114131344.K94930@d9168.upc-d.chello.nl> Mail-Followup-To: Edwin Groothuis , Len Conrad , freebsd-questions@freebsd.org References: <5.0.2.1.0.20010114125455.03406070@mail.Go2France.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <5.0.2.1.0.20010114125455.03406070@mail.Go2France.com>; from LConrad@Go2France.com on Sun, Jan 14, 2001 at 12:59:34PM +0100 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Jan 14, 2001 at 12:59:34PM +0100, Len Conrad wrote: > We'd like to use the netstat -ib command periodically to snapshot the > byte volumes to disk. I once tried to make a kind of ip-accounting-thingie for seeing what different services on my machine were eating the bandwith with ipfw: 300 allow tcp from any to thishost:www via xl0 310 allow tcp from any to thishost:smtp via xl0 320 allow tcp from any to thishost:ssh via xl0 330 allow udp from any to thishost:ntp via xl0 340 allow udp from any to thishost:domain via xl0 350 allow tcp from any:pop3 to thishost via xl0 360 allow tcp from any:smtp to thishost via xl0 370 allow tcp from any:www to thishost via xl0 380 allow tcp from any:ssh to thishost via xl0 390 allow udp from any:ntp to thishost via xl0 400 allow udp from any:domain to thishost via xl0 xxx allow ip from any to thishost via xl0 I once per hour got the statistics with "ipfw -a l" and then resetted it with "ipfw zero". Worked like a charm. Edwin -- Edwin Groothuis | Interested in MUDs? Visit Fatal Dimensions: mavetju@chello.nl | http://fataldimensions.nl.eu.org/ ------------------+ telnet://fataldimensions.nl.eu.org:4000 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message