[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Measuring network traffic on the same interface, to different nets

Sorry, I meant to send:

(I wasn't sure what your network address(es) were, so replace with your information)

iptables -I INPUT 1 -s -i eth0 -j ACCEPT
iptables -I INPUT 2 -i eth0 -j ACCEPT
iptables -I OUTPUT 1 -o -o eth0 -j ACCEPT
iptables -I OUTPUT 2 -o eth0 -j ACCEPT

By setting up allow rules for both in/out for the internal and external networks, this should provide the data you need. I believe MRTG also allows for mutli-colored graphing (i.e. in/out traffic on one graph for instance).

This will setup the rules in the proper order, and you can reset the counters any time you wish, or write a script to collect/reset them and import them to an mrtg compatible file.

p.s. the iptables rules do not _have_ to stay at #1 and #2... I simply choose to do that for my own purposes internally :). They should, however, be in that order.

> On Fri, 23 Aug 2002 13:04:01 +0800
> "Sanjeev \"Ghane\" Gupta" <ghane@dotxtra.com> wrote:
> > Folks,
> > 
> > I am running SQUID for a client, in transparent mode, woody, 2.4.19.  The
> > edge router sends all port 80 to me, I send out to the router on the same
> > interface.  I can capture total traffic on the interface.  The users are on
> > 202.a.x.y.
> > 
> > What I need is a way to see:
> >     Traffic on eth0 to and from 202.a
> >     Traffic on eth0 to and from all other nets
> > 
> > This way, I can clearly see what reduction in traffic is occuring.  I can
> > get figures from SQUID, but these do not tally with the edge router's view,
> > which shows practically no difference between incoming and outgoing on the
> > port.  If SQUID is caching, outgoing should be more, as the SQUID acts as a
> > source for some objects, right?
> > 
> > Any way to do this?
> > 
> > --
> > Sanjeev
> > 
> > 
> > -- 
> > To UNSUBSCRIBE, email to debian-isp-request@lists.debian.org
> > with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> > 

Attachment: pgp74NtJAJ9n7.pgp
Description: PGP signature

Reply to: