From: Florian Westphal <fw@strlen.de>
To: Tarun Khanna <tkhanna@akamai.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Question about getting counters for transparent terminated flows
Date: Thu, 9 Mar 2017 10:38:16 +0100 [thread overview]
Message-ID: <20170309093816.GA17668@breakpoint.cc> (raw)
In-Reply-To: <a2f3e82d-0155-4600-5ec9-f3b2a19265cb@akamai.com>
Tarun Khanna <tkhanna@akamai.com> wrote:
> I have an application that acts as a transparent proxy for tcp flows. I need
> to get packet and byte counters for these tcp flows on both sides of the
> proxy application. I looked at pulling the counters from the kernel using
> libnetfilter_conntrack. However I noticed that the conntrack library only
> shows one entry for flows that are terminated transparently. This is an
> issue, as I am not able to see byte and packet counters for the two sides of
> the flow separately. Is there a way to get the separate counters for flows
> that are transparently terminated?
>
> If the flow is terminated but not transparently, I do get two separate
> entries from libnetfilter_conntrack, and the counters are as I would expect
> them to be.
In transparent case conntrack cannot tell the two connections apart as
they use the same addresses.
You could try to place one side into another conntrack zone using
'-j CT --zone $x' in the raw table.
next prev parent reply other threads:[~2017-03-09 9:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 17:37 Question about getting counters for transparent terminated flows Tarun Khanna
2017-03-09 9:38 ` Florian Westphal [this message]
2017-03-09 15:53 ` Tarun Khanna
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=20170309093816.GA17668@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=tkhanna@akamai.com \
/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;
as well as URLs for NNTP newsgroup(s).