Re: Bandwidth Monitor

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

 



On Saturday 08 May 2004 9:57 am, Harry wrote:

> Hi All,
> I have a DSL connection which has a bandwidth capacity of 3GB a
> month...having said that I have 16 machines hooked up on the network with a
> linux server, is there a away to capture/monitor the total consumption of
> bandwidth utilised per machine or server basis.

I would recommend iptraf, ntop or ipac.

Try http://www.topology.org/comms/netmon.html for some ideas.

If you really want to do it with netfilter, try some rules like this:

iptables -A POSTROUTING -t mangle -d a.b.c.d
iptables -A PREROUTING -t mangle -s a.b.c.d

Repeat for every machine on your network, changing a.b.c.d in each pair of 
rules to match the IP address of that machine.

Note there is no target for these rules - this is deliberate (and correct).

When you want to know how many bytes have gone to & come from each machine:

iptables -L -t mangle -nvx

When you want to reset the counters to zero (midnight on 1st of each month?):

iptables -Z

Regards,

Antony.

-- 
Ramdisk is not an installation procedure.

                                                     Please reply to the list;
                                                           please don't CC me.



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux