Linux Netfilter discussions
 help / color / mirror / Atom feed
* bandwidth usage
@ 2002-07-08 10:56 Rohan Almeida
  2002-07-08 11:10 ` Antony Stone
  0 siblings, 1 reply; 2+ messages in thread
From: Rohan Almeida @ 2002-07-08 10:56 UTC (permalink / raw)
  To: netfilter


Hi List,
How do i get the bandwidth usage of a particular IP address, on
a m/c which is performing NAT?
can i use netstat? or maybe iptables?
Is there any tool available.
I tried iptraf, but its too much informative for me.
I just need to show current bandwdith usage
for 1 or more ips

Thanx,

--
arc_of_descent



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

* Re: bandwidth usage
  2002-07-08 10:56 bandwidth usage Rohan Almeida
@ 2002-07-08 11:10 ` Antony Stone
  0 siblings, 0 replies; 2+ messages in thread
From: Antony Stone @ 2002-07-08 11:10 UTC (permalink / raw)
  To: netfilter

On Monday 08 July 2002 11:56 am, Rohan Almeida wrote:

> Hi List,
> How do i get the bandwidth usage of a particular IP address, on a m/c which
> is performing NAT?
> Can i use netstat? or maybe iptables?
> Is there any tool available.
> I tried iptraf, but its too much informative for me.   I just need to show
> current bandwdith usage for 1 or more ips

Netfilter will help you track the number of packets & bytes sent to/from a 
specific IP address, but you'll have to check the numbers at regular 
intervals (eg a cron job once a minute ?) in order to convert this to 
bandwidth.

Just create some rules such as:

iptables -A FORWARD -s a.b.c.d
iptables -A FORWARD -d a.b.c.d

(Yes, that's correct, you don't have to have a target to jump to if you don't 
want one...)

where a.b.c.d is the IP address you're interested in, and then use

iptables -L FORWARD -n -v -x

to see the packet & byte counters.

 

Antony.


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

end of thread, other threads:[~2002-07-08 11:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-08 10:56 bandwidth usage Rohan Almeida
2002-07-08 11:10 ` Antony Stone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox