Trafic Counter

Bill Moran wmoran at potentialtech.com
Fri Jun 13 06:43:40 PDT 2003


Ian Barnes wrote:
> Hi,
> 
> I am running FreeBSD 4.8 with squid v 2.5_2. It is only active for one
> ethernet card (I have 3). I am using IPF, with IPNAT to do the NAT
> 
> What i would like to know, is how could i count the trafic through that
> ethernet card, and that one only.

The port in /usr/ports/net/mrtg may be what you want.

If that's overkill, you could simply add an IPFW rule that counts the
bytes through that interface, see man ipfw.

> And can i possibly set a limit as to the
> amount of trafic they are allowed to use. Like say 200meg a month or
> something?

man dummynet
is a good place to start.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



More information about the freebsd-questions mailing list