Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Jan 2001 13:13:44 +0100
From:      Edwin Groothuis <mavetju@chello.nl>
To:        Len Conrad <LConrad@Go2France.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ip traffic accounting
Message-ID:  <20010114131344.K94930@d9168.upc-d.chello.nl>
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 %2B0100
References:  <5.0.2.1.0.20010114125455.03406070@mail.Go2France.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010114131344.K94930>