Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Hauke Lampe <packbart@frell.ambush.de>
To: netfilter@lists.netfilter.org
Subject: Re: detect portscans in DNATed ports
Date: Thu, 10 Oct 2002 20:52:49 +0200	[thread overview]
Message-ID: <20021010185249.GB21761@frell.ambush.de> (raw)
In-Reply-To: <004001c27059$4ede7fc0$3201a8c0@leonardo>

On Thu, Oct 10, 2002 at 09:33:59 -0300, Leonardo Rodrigues ( listas ) wrote:

> I've a firewall script that deals with portscan in its external
> interface.

The sanest way to deal with portscans is IMO a REJECT rule at the end of the
INPUT / FORWARD chain.
 
>     Altough it works absolutely fine when someone tries to portscan the
> firewall, it seems to show all DNATed ports on the scanner.

And now you're astonished because DNAT works just as expected?

> Question is: in which chain/rule should I use psd module to get portscan
> in DNATed ports ??

Another question would be: Why do you put your gateway's security willingly
at risk by increasing the packetfilter complexity with unnecessary code that
can and will introduce new bugs, opening up new attack paths on your
machine? Just to be c00l3r than the kids scanning your netblock? Or to scare
away your customer looking for services that you may offer?

> I was thinking in doing this on NAT OUTPUT ....

OUTPUT? Maybe PREROUTING is what you want. Reading the netfilter
documentation won't hurt, either.

> what do you think ?

My suggestion would be that you forget this portscanning detection foo. A
port with no service listening on it and no DNAT rule forwarding it
elsewhere is still a closed port and connection attempts will be answered
with ICMP dest unreachable or TCP RST. DoSing yourself by blocking people
scanning for publicly available services is pointless. IMHO. YMMV.

Hauke.


      reply	other threads:[~2002-10-10 18:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10 12:33 detect portscans in DNATed ports Leonardo Rodrigues ( listas )
2002-10-10 18:52 ` Hauke Lampe [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=20021010185249.GB21761@frell.ambush.de \
    --to=packbart@frell.ambush.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox