From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: netfilter@vger.kernel.org
Subject: Re: CONNMARK and ip rule fwmark
Date: Sun, 30 Mar 2008 20:58:38 +0200 [thread overview]
Message-ID: <47EFE2DE.80202@plouf.fr.eu.org> (raw)
In-Reply-To: <alpine.LNX.1.10.0803301849080.28605@fbirervta.pbzchgretzou.qr>
Jan Engelhardt a écrit :
>
> On Sunday 2008-03-30 18:10, Pascal Hambourg wrote:
>
>> I agree that the use of the nat table for any purpose not related
>> to NAT should be avoided. However the advantage of the nat table is
>> that it sees only one packet per connection, while "-m conntrack
>> --ctstate NEW" or "-m state --state NEW" may match multiple packets
>> per connection, e.g. duplicate TCP SYN or all UDP sent packets in
>> the original direction before the first packet sent in the return
>> direction.
>
> That's nonsense -- the nat table sees every packet that is IPCT_NEW:
The nonsense would be that the nat table sees packets which don't create
a new connection, because this would be totally useless.
> iptables -t nat -A OUTPUT -d 134.76.13.21 -p tcp --syn -j LOG
> --log-prefix "[nat] "
> iptables -t filter -A OUTPUT -d 134.76.13.21 -p tcp --syn -j LOG
> --log-prefix "[filt] "
> iptables -t filter -A OUTPUT -d 134.76.13.21 -p tcp --syn -j DROP
This test is bogus because the final DROP deletes the conntrack entry
(the packet is dropped before the connection is confirmed) so each
packet appears to create a new connection and goes through the nat table.
next prev parent reply other threads:[~2008-03-30 18:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-30 11:03 CONNMARK and ip rule fwmark Steffen Heil
2008-03-30 11:23 ` Franck JONCOURT
2008-03-30 14:53 ` Jan Engelhardt
2008-03-30 15:08 ` Franck JONCOURT
2008-03-30 16:10 ` Pascal Hambourg
2008-03-30 18:27 ` Jan Engelhardt
2008-03-30 18:58 ` Pascal Hambourg [this message]
2008-03-30 16:21 ` Steffen Heil
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=47EFE2DE.80202@plouf.fr.eu.org \
--to=pascal.mail@plouf.fr.eu.org \
--cc=jengelh@computergmbh.de \
--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 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.