From: John Jung <john.j.jung@siemens.com>
To: netfilter@lists.netfilter.org
Subject: Rate Limiting After a Threshold
Date: Thu, 05 Jul 2007 14:34:42 -0700 [thread overview]
Message-ID: <468D63F2.7060402@siemens.com> (raw)
Hi,
I'm new to IP Tables in general, but I've been able to whack away at the
rules to get connlimit to do what I want. Now I'm trying to do something
more sophisticated, but it doesn't seem to work.
My ultimate goal is to allow most Web users to access my site, but to slow
down the abusers. So, for example, I want to let in the first 10 HTTP
connections in, and then after that, limit that IP to only 20 connections per
minute afterwards. (And then after a certain point, connlimit will block any
additional connections by that IP.)
I'm using a vanilla 2.6.21.3 Linux kernel, but I can't figure out how to
do it.
I think hashlimit is the key, but it really just doesn't want to work for
me. For example, I've tried:
iptables -A INPUT -p tcp --dport 23 -m hashlimit --hashlimit 1/hour
--hashlimit-mode srcip --hashlimit-burst 1 --hashlimit-name test
-j REJECT
but I can open up more than 1 telnet session in under a minute, let alone
an hour.
I've read and re-read the hashlimit man page, tried various arguments that
I've found on on the Web, all to now avail.
Any and all suggestions are welcomed.
Thanks.
John
--
+-------------------------------------+-------------------------------------+
| John Jung (john.j.jung@siemens.com) | Siemens Automation and Drives |
| Support Engineer | UGS PLM Software |
| Customer Support - GTAC | 10824 Hope Street, MS: 1177 |
| Operating Systems Group | Cypress, California 90630 |
+--------------------------- +1 (800) 955-0000 -----------------------------+
next reply other threads:[~2007-07-05 21:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-05 21:34 John Jung [this message]
2007-07-06 5:25 ` Rate Limiting After a Threshold Ray Leach
2007-07-06 10:22 ` Michael Hissler
2007-07-06 15:39 ` John Jung
2007-07-06 17:56 ` Michael Hissler
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=468D63F2.7060402@siemens.com \
--to=john.j.jung@siemens.com \
--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 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.