Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Athan <netfilter@miggy.org>
To: netfilter@lists.netfilter.org
Subject: Re: Scan not Nmap
Date: Fri, 27 Dec 2002 12:32:57 +0000	[thread overview]
Message-ID: <20021227123257.GG1878@miggy.org> (raw)
In-Reply-To: <006201c2ad8f$4c177710$d654fea9@wrl>

[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]

On Fri, Dec 27, 2002 at 08:04:08AM -0200, William da Rocha Lima wrote:
>    Rules for blocking nmap the scan..

  There's no way to completely block such a scan if you NEED to have
some ports open, say for email server (smtp, port 25) or web server
(port 80).

  It looks like you can, at least, block an nmap 'NULL' scan though, by
using the 'unclean' match support in netfilter.

  Make sure you have CONFIG_IP_NF_MATCH_UNCLEAN set to Y or M in the
kernel config, and then simply use a couple of rules:

	iptables -A INPUT -i eth1 --match unclean -j LOG --log-level info --log-prefix "fwd-unclean "
	iptables -A INPUT -i eth1 --match unclean -j DROP

Be sure to replace eth1 with your external interface.  This fooled nmap
-sN scan into thinking all ports were open, and it failed miserably to
guess the OS type with -O option.
  Note that a normal SYN scan (-sS) still works, as I said, if you have
a few ports open.

  Be aware that the 'unclean' match could possibly match on some valid
packets and block legitimate traffic.  I've only just started using it
now and will be keeping an eye on things.

HTH,

-Ath
-- 
- Athanasius = Athanasius(at)miggy.org / http://www.miggy.org/
                  Finger athan(at)fysh.org for PGP key
	   "And it's me who is my enemy. Me who beats me up.
Me who makes the monsters. Me who strips my confidence." Paula Cole - ME

[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

      reply	other threads:[~2002-12-27 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-27 10:04 Scan not Nmap William da Rocha Lima
2002-12-27 12:32 ` Athan [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=20021227123257.GG1878@miggy.org \
    --to=netfilter@miggy.org \
    --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