All of lore.kernel.org
 help / color / mirror / Atom feed
* Bandwidth Monitor
@ 2004-05-08  8:57 Harry
  2004-05-08 10:23 ` Krystian
  2004-05-08 10:53 ` Antony Stone
  0 siblings, 2 replies; 4+ messages in thread
From: Harry @ 2004-05-08  8:57 UTC (permalink / raw)
  To: Netfilter

[-- Attachment #1: Type: text/plain, Size: 672 bytes --]

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.This is complicated as I have squid also for caching.....did a lot of reserch there were some scripts for iptables but I cant figure out how to use it ?Has anyone used something like this B4?Help is really appreciated.

Regards

Harry





"In all this world, there is only you
When all else ceases, there is only you"  
-- to my MASTER!
    Harish
harish@sabnanis.com 
harish.sabnani@cyberhutoman.com 

[-- Attachment #2: Type: text/html, Size: 1643 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bandwidth Monitor
  2004-05-08  8:57 Bandwidth Monitor Harry
@ 2004-05-08 10:23 ` Krystian
  2004-05-08 10:53 ` Antony Stone
  1 sibling, 0 replies; 4+ messages in thread
From: Krystian @ 2004-05-08 10:23 UTC (permalink / raw)
  To: Harry; +Cc: Netfilter

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.This is 
> complicated as I have squid also for caching.....did a lot of reserch 
> there were some scripts for iptables but I cant figure out how to use 
> it ?Has anyone used something like this B4?Help is really appreciated.
>  
> Regards
>  
> Harry
>  
> "In all this world, there is only you
> When all else ceases, there is only you" 
> -- to my MASTER!
>     Harish
> harish@sabnanis.com <mailto:harish@sabnanis.com>
> harish.sabnani@cyberhutoman.com <mailto:harish.sabnani@cyberhutoman.com>

Hi

there r couple things u can do:
1.  every rule in iptables counts bytes of data which went through it. u 
can look at the counters by using command:
iptables -L -v
or maybe more specific for FORWARD chain: iptables -L FORWARD -v

u can place a specific counter for one host:
/sbin/iptables -A FORWARD -j ACCEPT -i eth0 -m state --state ESTABLISHED 
-d 192.168.0.19 --set-counters 0 0

2. use specialized netfilter addons (patch-o-matic) for counting and 
possibly doing what ever u want with leechers. the ones u can use are 
from BASE repository: QUOTA and from EXTRA repository connbytes. the web 
site is of course www.iptabless.org

GL & HF :)


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bandwidth Monitor
  2004-05-08  8:57 Bandwidth Monitor Harry
  2004-05-08 10:23 ` Krystian
@ 2004-05-08 10:53 ` Antony Stone
  2004-05-09  7:23   ` Tech
  1 sibling, 1 reply; 4+ messages in thread
From: Antony Stone @ 2004-05-08 10:53 UTC (permalink / raw)
  To: Netfilter

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.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Bandwidth Monitor
  2004-05-08 10:53 ` Antony Stone
@ 2004-05-09  7:23   ` Tech
  0 siblings, 0 replies; 4+ messages in thread
From: Tech @ 2004-05-09  7:23 UTC (permalink / raw)
  To: Netfilter

Hi,

Another option for bandwidth monitoring is BandwithD.

You can find it at:

http://bandwidthd.sourceforge.net/

Cheers
Rudi.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-09  7:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-08  8:57 Bandwidth Monitor Harry
2004-05-08 10:23 ` Krystian
2004-05-08 10:53 ` Antony Stone
2004-05-09  7:23   ` Tech

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.