Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.netfilter.org
Subject: Re: Unexpected RSTs?
Date: Fri, 11 Oct 2002 14:03:42 +0100	[thread overview]
Message-ID: <200210111303.g9BD3mL19306@vulcan.rissington.net> (raw)
In-Reply-To: <200210111434.52124.mklingens@ism.nl>

On Friday 11 October 2002 1:34 pm, Martijn Klingens wrote:

> Please consider the following piece of our firewall script's output:
>
> iptables -A acl_lan -p tcp --tcp-flags RST RST -j log_lan
> iptables -A log_lan -p tcp --tcp-flags RST RST -j LOG \
>         --log-level debug --log-prefix '* DROP: Unexpected RST * '
>
> The last line intrigues me. We drop these packets since quite a while, but
> didn't log them until yesterday. It turns out that almost 15% of my
> firewall log now consists of packets qualifying as 'Unexpected RST' though.

Depending on what else you're logging, 15% of your log entries could be a lot 
of packets, could be only a few....

> But... isn't the conntrack code at the beginning supposed to take care of
> accepting RSTs if they are associated with an active connection?

Yes.

> I'm a bit surprised to see this to say the least. It's not a subnet-wide
> portscan at least, the dropped packets definitely seem to indicate
> legitimate traffic.

I'd expect the reason might be a system sending two RST packets (I believe 
this is quite common, but I haven't done any specific network sniffing to 
check it out).   The first one takes down the connection so it is no longer 
ESTABLISHED, the second one gets logged because it doesn't correspond to an 
established connection...

Maybe you could try putting a LOG rule to catch *all* RSTs at the beginning 
of your rules (before even the ESTABLISHED, RELATED rule) and see if this 
shows they are coming along in pairs ?

Antony.

-- 

Most people have more than the average number of legs.


  reply	other threads:[~2002-10-11 13:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-11 12:34 Unexpected RSTs? Martijn Klingens
2002-10-11 13:03 ` Antony Stone [this message]
2002-10-11 14:29   ` Martijn Klingens
2002-10-11 16:07     ` Send mail Secure(SSL): No, Socket Error Sundaram Ramasamy
2002-10-11 17:20       ` Antony Stone
2002-10-16 13:36     ` Unexpected RSTs? Martijn Klingens

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=200210111303.g9BD3mL19306@vulcan.rissington.net \
    --to=antony@soft-solutions.co.uk \
    --cc=netfilter@lists.netfilter.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