From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Patrick McHardy <kaber@trash.net>
Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
Subject: Re: netlink socket filtering
Date: Wed, 05 Mar 2008 14:20:04 +0100 [thread overview]
Message-ID: <47CE9E04.90308@netfilter.org> (raw)
In-Reply-To: <47CAAD4E.3020508@trash.net>
Patrick McHardy wrote:
> Out of interest how feasible it would be to do ctnetlink
> message filtering using socket filters I've hacked together
> these two patches for the kernel and libnl to filter on
> the TCP_CONNTRACK_ESTABLISHED state.
>
> The filtering works well, but it brought up a question that
> I think also affects the patches you've posted earlier.
> You mentioned that for synchronization you want to filter
> on ESTABLISHED states. Since BPF only gets the final message
> it can't filter on the previous conntrack state when
> transitioning, but only on the current state. This means
> that a filter on TCP_CONNTRACK_ESTABLISHED won't let
> a message for a transition from TCP_CONNTRACK_ESTABLISHED
> to TCP_CONNTRACK_CLOSED pass.
>
> Your patches add a new table, at which point the conntrack
> will also already have performed the transistion and filtering
> using state matches will also only see the new state. So I'm
> wondering, what are the exact filtering needs for replication
> and would something like this work?
I mainly need conntrack event filtering capabilities by:
* protocol states, so that one can replicate TCP Established and
whatever state in the connection closure (or even the destroy event), I
don't need state transitions.
* source address and destination, so that the administrator can
replicate traffic for certain parts of the networks, eg. 192.168.0.0/24
I link this BSF-based solution, however, would they be flexible enough
for my needs? Another question that comes to my mind, isn't this
filtering coming to late? I mean, we have to invest time to build the
netlink message and then decide if we want to replicate it or not.
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2008-03-05 13:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-02 13:36 netlink socket filtering Patrick McHardy
2008-03-05 13:20 ` Pablo Neira Ayuso [this message]
2008-03-05 13:22 ` Pablo Neira Ayuso
2008-03-10 16:59 ` Patrick McHardy
2008-03-16 11:58 ` Pablo Neira Ayuso
2008-03-17 14:51 ` Patrick McHardy
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=47CE9E04.90308@netfilter.org \
--to=pablo@netfilter.org \
--cc=kaber@trash.net \
--cc=netfilter-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.