All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Sam Roberts <vieuxtech@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: can libnetfilter_conntrack be used to write a userspace connection tracker?
Date: Wed, 12 Jan 2011 22:36:54 +0100	[thread overview]
Message-ID: <4D2E1EF6.1010003@netfilter.org> (raw)
In-Reply-To: <AANLkTimfmoEKVWA_kBM-1DiuTR0=OG0Y8kC5nvq0G7G-@mail.gmail.com>

On 12/01/11 22:25, Sam Roberts wrote:
> I'm working on a connection tracker for a RPC-like protocol (over TCP).
> 
> I believe that by inspecting packets using nfqueue, and
> creating/destroying expectations using nfconntrack, I can do a
> connection tracker in user-space.
> 
> In order to remove nfqueue from the mix, I've been looking at the
> conntrack code, trying to figure out whether even notifications about
> connection status can include the TCP data that I need to inspect, the
> data that's in the skbs provided to kernel module conntrack helpers. I
> haven't been able to be certain what libnfconntrack can/cannot do, but
> it seems outside of the usage that the command line tools and
> conntrack daemon need, so I suspect its not possible.
> 
> Can somebody confirm my suspicions?

You can implement a user-space conntrack helper with NFQUEUE and
libnetfilter_conntrack:

http://people.netfilter.org/pablo/userspace-conntrack-helpers/

That's a proof-of-concept, ideally there would be a generic daemon so
you can develop your own plugins for state tracking upon it.

That daemon's on my TODO list.

You require Linux kernel >= 2.6.37

  reply	other threads:[~2011-01-12 21:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-12 21:25 can libnetfilter_conntrack be used to write a userspace connection tracker? Sam Roberts
2011-01-12 21:36 ` Pablo Neira Ayuso [this message]
2011-02-16  0:08   ` Sam Roberts
2011-02-16 13:20     ` Pablo Neira Ayuso
2011-02-16 17:52       ` Sam Roberts
2011-02-16 23:12         ` Pablo Neira Ayuso

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=4D2E1EF6.1010003@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=vieuxtech@gmail.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 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.