All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Horton <arimus.uk@googlemail.com>
To: "J. Bakshi" <joydeep@infoservices.in>
Cc: netfilter@vger.kernel.org
Subject: Re: ssh overflow blacklisting not working properly
Date: Mon, 29 Mar 2010 09:18:24 +0100	[thread overview]
Message-ID: <56378e321003290118i2fd96c99l29f2590743e5fb36@mail.gmail.com> (raw)
In-Reply-To: <4BB0574A.2060106@infoservices.in>

On 29 March 2010 08:31, J. Bakshi <joydeep@infoservices.in> wrote:
>
> iptables -A INPUT -p tcp -m state --state NEW --dport $SSH_PORT -m
> hashlimit \
> --hashlimit 3/min --hashlimit-burst 1 --hashlimit-htable-expire 180000 \
> --hashlimit-mode srcip --hashlimit-name sshlimit -j ACCEPT
>
> #----------------------------------------#
>
> As expected connection attempt more than 3 in a min is dropped and
> ensure only 3 connection per minute. But It should also block the source
> IP for 3 min and this part is not working here. Could any one kindly
> suggest any clue or reason behind this ?


Unless you have other rules floating around all the rule does is allow
upto 3 connections per minute to ssh based on source-ip. It won't
block other connections from that source ip, just the ssh ones which
exceed your defined limit (3/min).

I'd guess from your comments there are additional rules, without
seeing them though very hard to work out what is wrong as all I can
say is that rule does its job... blocking ssh > 3 connection attempts
per min per soucre ip.

R.

  reply	other threads:[~2010-03-29  8:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29  7:31 ssh overflow blacklisting not working properly J. Bakshi
2010-03-29  8:18 ` Richard Horton [this message]
2010-03-29 10:51   ` J. Bakshi
2010-03-29 11:05     ` Jan Engelhardt
2010-03-29 11:22       ` J. Bakshi
2010-03-29 11:22       ` J. Bakshi
2010-03-29 11:54         ` Richard Horton
2010-03-29 15:10           ` J. Bakshi
2010-03-30  7:42           ` J. Bakshi
2010-03-30  8:23             ` Richard Horton
2010-03-30  8:52               ` 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=56378e321003290118i2fd96c99l29f2590743e5fb36@mail.gmail.com \
    --to=arimus.uk@googlemail.com \
    --cc=joydeep@infoservices.in \
    --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 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.