From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "U.Mutlu" <for-gmane@mutluit.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [iptables] tcp handshake: ACK RST silently converted to RST ?
Date: Wed, 28 Sep 2011 23:14:41 +0200 [thread overview]
Message-ID: <20110928211441.GB2761@1984> (raw)
In-Reply-To: <j5n8j4$713$1@dough.gmane.org>
On Sun, Sep 25, 2011 at 02:59:15PM +0200, U.Mutlu wrote:
> I made a funny observation:
>
> client sends a tcp SYN packet to a served port on server,
> server answers with ACK SYN,
> client sends ACK RST to abort the 3-way-handshake.
>
> When logging these sequences with the following commands:
> iptables -A INPUT -p tcp --tcp-flags SYN SYN -j LOG --log-prefix "SYN IN "
> iptables -A OUTPUT -p tcp --tcp-flags SYN SYN -j LOG --log-prefix "SYN OUT "
> iptables -A INPUT -p tcp --tcp-flags RST RST -j LOG --log-prefix "RST IN "
> iptables -A OUTPUT -p tcp --tcp-flags RST RST -j LOG --log-prefix "RST OUT "
> then one sees that the "ACK RST" gets logged only as a "RST".
This behaviour is correct according to your rule-set.
> Is this perhaps a bug of iptables or its log module?
If you want to catch the ACK,RST case, you need to:
iptables -A OUTPUT -p tcp --tcp-flags ACK,RST RST \
-j LOG --log-prefix "ACK, RST OUT "
prev parent reply other threads:[~2011-09-28 21:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-25 12:59 [iptables] tcp handshake: ACK RST silently converted to RST ? U.Mutlu
2011-09-28 21:14 ` Pablo Neira Ayuso [this message]
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=20110928211441.GB2761@1984 \
--to=pablo@netfilter.org \
--cc=for-gmane@mutluit.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).