From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: Connection Stats per interface using iptables
Date: Mon, 05 Nov 2007 09:32:15 -0600 [thread overview]
Message-ID: <472F377F.1040402@riverviewtech.net> (raw)
In-Reply-To: <971580.28281.qm@web1005.biz.mail.sp1.yahoo.com>
On 11/05/07 02:09, Shyam Prasad wrote:
> Is there a way to directly fetch these stats using iptables rule or i
> have to create separate chains for each interface ,redirect the
> traffic to these interface specific chains and then calculate the
> stats.
Yes you can use IPTables to gather this information for you. IPTables
its self does not keep track of this information, but you could easily
write rules to act act as counters that you would then later check the
number of packets they have matched. You just need to add some rules to
IPTables to match the input and / or the output interface and / or any
other protocol information.
Depending on how many rules you are going to write, you may want to look
at optimizing the rules a bit by creating a user defined chain for each
interface. With user defined chains you will not have to have packets
traverse rules that they will never match.
Grant. . . .
prev parent reply other threads:[~2007-11-05 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-05 8:09 Connection Stats per interface using iptables Shyam Prasad
2007-11-05 15:32 ` Grant Taylor [this message]
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=472F377F.1040402@riverviewtech.net \
--to=gtaylor@riverviewtech.net \
--cc=netfilter@vger.kernel.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