All of lore.kernel.org
 help / color / mirror / Atom feed
From: lst_hoe01@kwsoft.de
To: netfilter@lists.netfilter.org
Subject: Re: Strange RST,ACK packet from my Host
Date: Thu, 23 Dec 2004 20:32:20 +0100	[thread overview]
Message-ID: <1103830340.41cb1d440ddb7@webmail.kwsoft.de> (raw)
In-Reply-To: <1103817721.6478.74.camel@hubcap.ljm.dom>

Zitat von Jason Opperisano <opie@817west.com>:

> the RST,ACK from your mail server is not the strangest packet in this
> capture by a long shot.
>
> after the three-way handshake--the remote machine sends this (before it
> ever receives the 220 banner from your mail server, already breaking the
> SMTP protocol):
>
>   POST / HTTP/1.0
>
> which is not an SMTP command.

Yes, i know this is more a open proxy than a mailserver.

> the remote machine then sends:
>
>   RSET
>
> which is a request to abort the current "mail transfer" and start
> fresh.  i'm pretty sure the RFC's require the remote side to wait for a:
>
>   250 OK
>
> response to an RSET before continuing.  the remote machine in your
> capture can't be bothered with such trivial things, and sends message
> data:
>
>   man eugene mookie
>   abcdef
>
> which does look pretty important, especially considering we have no MAIL
> FROM or RCPT TO at this point.
>
> after a couple of ACK's, the remote side sends:
>
>   FIN,ACK
>
> and your machine sends:
>
>   ACK
>
> which puts this connection (with respect to your firewall) into state
> "CLOSE-WAIT."

Until this point its a normal crappy spam-send ...

>
> your mail server then sends an SMTP error:
>
>   502 Error: Command not implemented
>
> which is probably in response to the POST command at the beginning, or
> possibly the 'man eugene mookie' command.
>
> to which the remote machine sends a RST packet, as it seems to have
> moved on with its life at this point.

The mixup in the SMTP protocol could be by ESMTP pipelining ...
I'm pretty sure postfix does it right ;-)

> your firewall sees the client->server RST packet and puts the connection
> in CLOSE state.
>
> and finally, your mail server sends a RST,ACK to acknowledge the RST;
> which arrives 20 seconds after the connection went into CLOSE-WAIT, and
> 10 seconds after the RST put the connection into CLOSE.
>
> my guess is that the RST,ACK is being sent after the firewall had
> removed the connection from conntrack.  i *believe* the default timeout
> for the TCP CLOSE state is 10 seconds; which would make sense.

That was my idea at first. What really stumble me is the source port from my
machine which is totally unrelated to the rest of the communication.

>
> oh--and i don't know if you've picked up on this or not--but the remote
> machine in this communication never had any honorable intentions with
> this communication, and shouldn't concern you.

Spam anyway of course but as said only the last packet is dropped by the
firewall and i want to know why it is created with this strange source port.
For my understandig it should origin from port 25 or have i missed something???


Regards & Thanxs

Andreas


      reply	other threads:[~2004-12-23 19:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-23  8:07 Strange RST,ACK packet from my Host lst_hoe01
2004-12-23 16:02 ` Jason Opperisano
2004-12-23 19:32   ` lst_hoe01 [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=1103830340.41cb1d440ddb7@webmail.kwsoft.de \
    --to=lst_hoe01@kwsoft.de \
    --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 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.