From: Antony Stone <Antony@Soft-Solutions.co.uk>
To: netfilter@lists.samba.org
Subject: Re: need help in rate limiting tcp-syn !!
Date: Sat, 29 Jun 2002 23:48:09 +0100 [thread overview]
Message-ID: <20020629224811.VUSB295.mta03-svc.ntlworld.com@there> (raw)
In-Reply-To: <20020629205619.20469.qmail@webmail6.rediffmail.com>
On Saturday 29 June 2002 9:56 pm, ganesh kumar godavari wrote:
> hello group,
> i have attached my shell code to limit the ping-icmp and
> tcp-syn and tcp-portscan protection. i need some help in this
> matter.
>
> i am not able to limit the incoming tcp-syn packet and port scan
> packets done using nmap.
>
> i used nmap -sS -O -P0 -p1-15 <host name> for port scanning, nmap
> -sS -O -P0 <host name> for syn flooding.
> $IPTABLES -N PORTSCANLIMIT
> $IPTABLES -A PORTSCANLIMIT -p tcp --tcp-flags SYN,ACK,FIN,RST RST
> -m limit --limit $TCPSYNLIMIT --limit-burst $TCPSYNLIMITBURST -j
> ACCEPT
> $IPTABLES -A PORTSCANLIMIT -p tcp --tcp-flags SYN,ACK,FIN,RST RST
> -j DROP
> $IPTABLES -A PORTSCANLIMIT -j RETURN
You're using -sS with nmap, which sends SYN packets, but your portscanlimit
rule is looking for packets with the RST flag set.
The option "--tcp-flags SYN,ACK,FIN,RST RST" means "look at the flags SYN,
ACK, FIN and RST, and match if the RST flag (only) is set".
If you want to match on only the SYN flag being set, then the option should
read "--tcp-flags SYN,ACK,FIN,RST SYN" (this will ignore the PSH and URG
flags).
If you want to match on the SYN flag being set no matter what other flags may
be set as well, use "--tcp-flags SYN SYN".
Remember that this is not the only way of doing a port scan with nmap,
however :-)
Antony.
next prev parent reply other threads:[~2002-06-29 22:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-29 20:56 need help in rate limiting tcp-syn !! ganesh kumar godavari
2002-06-29 22:48 ` Antony Stone [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-06-29 23:21 ganesh kumar godavari
2002-06-30 5:35 ` George Georgalis
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=20020629224811.VUSB295.mta03-svc.ntlworld.com@there \
--to=antony@soft-solutions.co.uk \
--cc=netfilter@lists.samba.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