All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Fenert <daniel@rotfl.linux.krakow.pl>
To: netfilter@lists.netfilter.org
Subject: Limiting number of connections
Date: Sat, 4 Jan 2003 01:47:51 +0100	[thread overview]
Message-ID: <20030104004751.GA3308@fenert.net> (raw)

Is there a simple way to limit number of connection coming from particular
client (ip address or subnet)?
I've searched through archive, and found only some patch to CVS version
of netfilter (it was year 2000)...

I've got problem with a few clients, they' are able to make 200+
connections on 128Kbit connection (according to /proc/net/ip_conntrack)

I thought about it today for a few minutes, and came with the idea:
1) Parse /proc/net/ip_conntrack and get clients with more than xxx
   connections
2) Setup rule to DROP NEW,RELATED to force them to close some connections
3) wait a minute, go to 1) checking additionally number of connections
   for blocked IP's. If number drops below xxx, delete rule DROP NEW,...
This is ugly, but possibly will work.

I hope that  there's better way to do it?

-- 
Daniel Fenert                 --==> daniel@fenert.net <==--
==-P o w e r e d--b y--S l a c k w a r e-=-ICQ #37739641-==
Is not that the nature of men and women -- that the pleasure is in the learning
of each other?        -- Natira, the High Priestess of Yonada, stardate 5476.3.


             reply	other threads:[~2003-01-04  0:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-04  0:47 Daniel Fenert [this message]
2003-01-04  1:06 ` Limiting number of connections Alex McCubbin
2003-01-04  8:15   ` help Marking Packets hare ram
  -- strict thread matches above, loose matches on Subject: below --
2003-01-07 16:26 Limiting number of connections Charlie Reitsma

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=20030104004751.GA3308@fenert.net \
    --to=daniel@rotfl.linux.krakow.pl \
    --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.