From: Michael <mutk@iprimus.com.au>
To: IPtables Users <netfilter@lists.samba.org>
Subject: Re: bandwidth again maybe O T
Date: Thu, 05 Sep 2002 18:44:27 +1000 [thread overview]
Message-ID: <3D77196B.7090301@iprimus.com.au> (raw)
In-Reply-To: 200209051228.03102@.
PayalR wrote:
>Hi,
>Thanks a lot for mails. Well, I think I get the general idea.
>
>
>>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?
>
Since you are pinging from localhost, I don't think the FORWARD chain is
traversed. The packets go straight to OUTPUT chain. If the packets came
from somewhere else, and are to be forwarded by the host on which
iptabls is running, then the packets will be seen and counted by FORWARD.
Place the rules in the OUTPUT chain, you should see things from
localhost being counted..
Cheers,
Michael
next prev parent reply other threads:[~2002-09-05 8:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200209041908.49707@.>
[not found] ` <200209041527.g84FRpv31480@vulcan.rissington.net>
2002-09-05 7:12 ` bandwidth again maybe O T PayalR
[not found] ` <200209051228.03102@.>
2002-09-05 8:44 ` Michael [this message]
2002-09-05 10:33 ` Michael
2002-09-05 10:00 ` Antony Stone
[not found] <0H1Y00DGTFACWJ@l-daemon>
2002-09-05 7:54 ` Stewart Thompson
2002-09-09 6:31 ` PayalR
[not found] ` <200209091158.11787@.>
2002-09-09 8:59 ` Antony Stone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D77196B.7090301@iprimus.com.au \
--to=mutk@iprimus.com.au \
--cc=netfilter@lists.samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox