All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander W. Janssen" <yalla@ynfonatic.de>
To: Netfilter Mailinglist <netfilter@lists.netfilter.org>
Subject: Re: is it possible to limit the connection number?
Date: Wed, 5 Mar 2003 18:09:55 +0100	[thread overview]
Message-ID: <20030305170955.GD12124@ynfonatic.de> (raw)
In-Reply-To: <F599aZbLAX3cf3ednHM00004be2@hotmail.com>

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

On Fri, Feb 28, 2003 at 07:48:50AM +0000, SB CH wrote:
> Hello all.
> 
> I would like to limit the connection number per ip 
> using iptables extension function. 
> for example, one can connect the firewall behinded server just 10 per a 
> hour.
> 
> Is it possible to set using iptables?

You can use the limit-match for this:

iptables -A FORWARD -s $LIMITED_HOST -d $DESTINATION \
-m state --state NEW -m limit --limit 10/hour -j ACCEPT

But you need some dropping/rejection rule later as well. And be sure that you
have some rule which allows ESTABLISHED connections, like

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

But i think that's more a work for some application-proxy like Squid...
 
> thanks in advance.

Hope that helps,
Alex


-- 
"Mr Data, when I said 'Fire at Will', I didn't mean for you to be so literal."
Instructions for use of this post: Insert tounge in cheek. Read as normal.

[-- Attachment #2: Type: application/pgp-signature, Size: 248 bytes --]

      reply	other threads:[~2003-03-05 17:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28  7:48 is it possible to limit the connection number? SB CH
2003-03-05 17:09 ` Alexander W. Janssen [this message]

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=20030305170955.GD12124@ynfonatic.de \
    --to=yalla@ynfonatic.de \
    --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.