Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@vger.kernel.org
Subject: Re: miscellaneous netfilter questions
Date: Wed, 03 Mar 2010 17:57:27 +0100	[thread overview]
Message-ID: <4B8E94F7.4080908@plouf.fr.eu.org> (raw)
In-Reply-To: <20100303165419.87692fvlklxfna68@webmail.physik.uni-muenchen.de>

Hello,

Christoph Anton Mitterer a écrit :
> 
> 1) If I disable conntracking for packets using NOTRACK in raw what  
> happens if I e.g. match the state later in filter? Does the rule  
> simply not match for such packets or is it INVALID?

Packets processed with the NOTRACK target have the UNTRACKED state.

> 2) The addrtype module provides several address types. Where can I  
> find which addreses are _exactly_ matched by a given type for a given  
> protocol (especially IP4/6).
> I'm especiylly (but not only) interested in what LOCAL actually means?
> Is it all addresses of a hosts network interfaces PLUS the ALL  
> addresses on that networks (like a "localnets")?
> Or is it all the addresses which the kernel thinks the host has itself, e.g.

The latter, I guess.

> 3) --fragment
> a) It's quite clear what happens if one uses "-f" or "! -f" but what  
> happens if neither of the tow is give? Does it mean "! -f" or is it  
> like "match not fragmented packets AND fragmented packets (both the  
> first AND further fragments).

The latter, obviously. All packets are matched regardless of fragmentation.

> b) Is it true, that when conntracking is used, that packets are  
> automatically defragmented so one doesn't have to care on fragments at  
> all?

For IPv4, indeed when conntrack is enabled incoming fragmented datagrams
are reassembled before the PREROUTING chains. Note that packets which
are to be delivered locally are reassembled by the stack (not by
conntrack) before the INPUT chains anyway, so you never see fragments in
INPUT chains.

AFAIK things work a bit differently for IPv6 : fragmented datagrams are
"virtually" reassembled for conntrack (the reason being that an IPv6
router does not handle fragmentation/reassembly), but continue to exist
as fragments through the ip6tables chains and the IPv6 stack.

> In that case, what happens to packets for which conntracking was  
> disabled (NOTRACK in raw)? Are they also defragmented or not?

Good question. I have no answer. This requires some code reading or a
bit of testing.

  reply	other threads:[~2010-03-03 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03 15:54 miscellaneous netfilter questions Christoph Anton Mitterer
2010-03-03 16:57 ` Pascal Hambourg [this message]
2010-03-04  5:52   ` ratheesh k
2010-03-04 10:19   ` Christoph Anton Mitterer
2010-03-04 14:37     ` Mart Frauenlob
2010-03-04 23:36     ` Pascal Hambourg

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=4B8E94F7.4080908@plouf.fr.eu.org \
    --to=pascal.mail@plouf.fr.eu.org \
    --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