From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Nicolas Maître" <nimai@skynet.be>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: Drop a packet while keeping the conntrack alive
Date: Thu, 21 Mar 2013 02:53:06 +0100 [thread overview]
Message-ID: <20130321015306.GB3779@localhost> (raw)
In-Reply-To: <CACd4Q01yBxCJo8XcvY8+_HDqkuQG9Zz7=x6BGKdGCh7MA2oFHw@mail.gmail.com>
Hi Nicolas,
On Thu, Mar 21, 2013 at 01:57:33AM +0100, Nicolas Maître wrote:
> Hi,
>
> I've developed a connection tracking module which I'd like to use for
> detecting packets that may be dropped with an iptables rule.
> That is, the connection tracker can detect that a packet is not valid
> in the context of the tracked connection. So, I'd like the
> administrator to be able to add a rule that would allow to drop/reject
> that packet.
> A possible use case is to block packets from an attacker (assumed as
> such as the packet is not conform considering the current state of the
> connection).
>
> As far as I understand it, the connection tracker usually handle this
> by returning a negative/null value (-NF_ACCEPT, NF_DROP, ...) which
> marks the packet invalid, so that it is possible to use the
> xt_conntrack extension to match it.
>
> I've looked at the TCP connection tracker. If I understand well, the
> current behavior is that if we've got an INVALID packet, it kills the
> conntrack, then create it again if we see an ACK later on. Am I right?
Packets that are invalid do not destroy the conntrack entry. The TCP
tracker explicitly destroys the entry by calling nf_ct_kill function
in some situations (RST seen / tracking is out-of-sync).
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-03-21 1:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 0:57 Drop a packet while keeping the conntrack alive Nicolas Maître
2013-03-21 1:53 ` Pablo Neira Ayuso [this message]
2013-03-21 15:17 ` Nicolas Maître
2013-03-21 16:07 ` Pablo Neira Ayuso
2013-03-21 16:16 ` Nicolas Maître
2013-03-21 2:05 ` Jorge Dávila
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=20130321015306.GB3779@localhost \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=nimai@skynet.be \
/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.