On Thursday 20 November 2003 9:41 pm, Helder C Souza wrote:

> Hi,
>
>   Someone knows if squid can make a report (log) of the traffic utilization
> of my link, per protocol (ftp,www, streamming or overall traffic ) .
>   I don�t have a machine to install a mrtg and if squid should help with
> simple numbers it should be great.

I don't think Squid can do this for you, but some simple netfilter (iptables) 
rules (assuming you're using Linux) would do the trick:

iptables -A INPUT -p tcp --sport 80
iptables -A INPUT -p tcp --sport 443
iptables -A INPUT -p tcp --sport 20
iptables -A INPUT -p tcp --sport 21

(These rules assume that the machine itself if making the connections - if 
it's actually a router instead then change INPUT to FORWARD).

The command "iptables -Z" will reset the packet & byte counters to zero.

The command "iptables -L -n -v -x" will show you how many packets & bytes 
have been matched by each rule - in the above examples, http, https, ftp 
data, and ftp control.

Add as many rules as you like for different port numbers.

Antony.

-- 

What a waste it is to lose one's mind -- or not to have a mind.   How true 
that is.

 - Dan Quayle, vice-president of the United States of America
                                                     Please reply to the list;
                                                           please don't CC me.

Reply via email to