Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Alessandro Vesely <vesely@tana.it>
To: netfilter@vger.kernel.org
Subject: Re: How to create rule from log file information ?
Date: Mon, 25 Jan 2010 19:48:55 +0100	[thread overview]
Message-ID: <4B5DE797.4070801@tana.it> (raw)
In-Reply-To: <20100125230202.60f24a5a@infoservices.in>

On 25/Jan/10 18:32, J. Bakshi wrote:
> I have collected the iptables log against nmap scan. Like
>
>[omitted almost identical log lines]
>
> Can I make rule-set to prevent the above scan from the info collected at the log ?
> Kindly enlighten me. Then I can make more rule sets from the log.

I'm not an nmap expert, but AFAIK nmap is designed to avoid just that. 
I have installed some logging iptables rules, similar to the ones in 
your previous message (from Arno's iptables scripts, IIRC) and 
sometimes some of them fire, presumably because inappropriate flags 
had been given to nmap.

To recognize a scan, one may look at almost simultaneous TCP syn 
occurring to several nearby ports/ addresses, and not followed by an 
ack. This would require specific connection tracking code that I've 
never heard about. At any rate, you /have/ to respond to syn requests, 
because they may be legit. You may recognize that they were scans by 
analyzing the logs some time later, presumably for banning the 
relevant IPs from further accessing your server...

HTH

  reply	other threads:[~2010-01-25 18:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25 17:32 How to create rule from log file information ? J. Bakshi
2010-01-25 18:48 ` Alessandro Vesely [this message]
2010-01-25 21:45   ` Mart Frauenlob
2010-01-27  3:04     ` J. Bakshi

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=4B5DE797.4070801@tana.it \
    --to=vesely@tana.it \
    --cc=netfilter@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