bandwidth again maybe O T
A message that is not in the archive (sent off-list or not yet received): 0H1Y00DGTFACWJ@l-daemon
Hi:
If the connections were to the local machine, they
Wouldn't show up in the Forward Chain, but in the input chain. Did you check all the counters? Iptables -v -L.
Stu.........
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of PayalR
Sent: September 5, 2002 12:13 AM
To: [email protected]
Subject: Re: bandwidth again maybe O T
Hi,
Thanks a lot for mails. Well, I think I get the general idea.
Quoted 4 lines
However, to measure the amount of http traffic going to/from a specific IP address, put a couple of rules such as this in your FORWARD chain:
iptables -I FORWARD -d a.b.c.d -p tcp --dport 80
iptables -I FORWARD -s a.b.c.d -p tcp --sport 80
I wanted for all protocol and not just http so I modified your rule a bit like,
iptables -I FORWARD -d 192.168.0.1 -p tcp
iptables -I FORWARD -s 192.168.0.1 -p tcp
These are the only two rules I have.
I tried to test it using
#iptables -L FORWARD -x -v
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
0 0 tcp -- any any localhost.localdomain
anywhere
0 0 tcp -- any any anywhere
localhost.localdomain
I tried pinging it few times, connecting to port 25, telnet, 80 etc. fom the local machine. But the number of bytes above do not change.
What must be wrong?
Thanks a lot in advance and bye.
-Payal
Quoted 2 lines
You might want to run this command in a cron job every day (or perhaps
more
Quoted 9 lines
frequently) and then you can calculate daily traffic patterns throughout a month etc.
You can reset the counters with
iptables -Z FORWARD
If you combine the -Z option with the earlier command, you will find out the values of the counters and then they will be (atomically) reset to
zero
Quoted 3 lines
so you can start counting a new day from zero.
Antony.
Hi,
Thanks a lot for the mails. I am late to reply cos' my connection was down
for 4 days.
Well, I put the rules like
ptables -I FORWARD -d 192.168.0.1 -p tcp
iptables -I FORWARD -s 192.168.0.1 -p tcp
Yes, I can see the logs by,
iptables -v -L
But there is nothing in FORWARD chain. The input and output chains are filled up.
What is the problem?
Thanks a lot and bye.
-Payal
Quoted 67 lines · Stewart Thompson
Hi:
If the connections were to the local machine, they
Wouldn't show up in the Forward Chain, but in the input chain. Did you check all the counters? Iptables -v -L.Stu.........
-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of PayalR
Sent: September 5, 2002 12:13 AM
To: [email protected]
Subject: Re: bandwidth again maybe O THi,
Thanks a lot for mails. Well, I think I get the general idea.Quoted 4 lines
However, to measure the amount of http traffic going to/from a specific IP address, put a couple of rules such as this in your FORWARD chain:
iptables -I FORWARD -d a.b.c.d -p tcp --dport 80
iptables -I FORWARD -s a.b.c.d -p tcp --sport 80I wanted for all protocol and not just http so I modified your rule a bit like,
iptables -I FORWARD -d 192.168.0.1 -p tcp
iptables -I FORWARD -s 192.168.0.1 -p tcpThese are the only two rules I have.
I tried to test it using
#iptables -L FORWARD -x -v
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
0 0 tcp -- any any localhost.localdomain
anywhere0 0 tcp -- any any anywhere
localhost.localdomainI tried pinging it few times, connecting to port 25, telnet, 80 etc. fom the local machine. But the number of bytes above do not change. What must be wrong?
Thanks a lot in advance and bye.
-PayalQuoted 1 line
You might want to run this command in a cron job every day (or perhaps
more
Quoted 9 lines
frequently) and then you can calculate daily traffic patterns throughout a month etc.
You can reset the counters with
iptables -Z FORWARD
If you combine the -Z option with the earlier command, you will find out the values of the counters and then they will be (atomically) reset to
zero
Quoted 3 lines
so you can start counting a new day from zero.
Antony.
A message that is not in the archive (sent off-list or not yet received): 200209091158.11787@.
Quoted 7 lines · PayalR
Hi,
Thanks a lot for the mails. I am late to reply cos' my connection was down
for 4 days.
Well, I put the rules like
ptables -I FORWARD -d 192.168.0.1 -p tcp
iptables -I FORWARD -s 192.168.0.1 -p tcp
Quoted 5 lines
Yes, I can see the logs by,
iptables -v -L
But there is nothing in FORWARD chain. The input and output chains are filled up.
What is the problem?
Are you trying to count packets going in & out of the firewall machine, or are you trying to count packets going through the firewall between two other machines ?
eg if you ping the firewall itself from some client, you will see packets
comin the INPUT chain, and replies go out the OUTPUT chain. This will not
generate any FORWARD packets at all.
if you ping machine A on one side of your firewall from machine B on the other side of your firewall (neither A nor B actually is your firewall) then you will see packets in the FORWARD chain but nothing in the INPUT or OUTPUT chains.
Does this clarify things ?
Antony.
Signature · 6 lines
There are two possible outcomes. If the result confirms the hypothesis, then you've made a measurement. If the result is contrary to the hypothesis, then you've made a discovery. - Enrico Fermi