From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: netfilter@vger.kernel.org
Subject: Re: A very basic chain question
Date: Mon, 07 Sep 2009 09:47:48 +0200 [thread overview]
Message-ID: <4AA4BAA4.2060004@plouf.fr.eu.org> (raw)
In-Reply-To: <4AA4AF15.8000602@infoservices.in>
Hello,
J. Bakshi a écrit :
>
> check limit ( say 10/min) --> check connlimit ( 2 per ip ) --> check
> hashlimit ( 2 attempt per min) ---> ACCEPT.
>
> I have made a chain called sshrate but don't find the way to append the
> rules in that chain one by one. If I simply append the rules as accept
> then the very first rule is working bypassing the other two and my
> objective is to pass the rules in a pipe one by one and finally accept
> the valid packets. Could any one enlighten me in that direction ?
DROP (or REJECT) packets which fail early checks if possible :
-A sshrate -m <!check1> -j DROP
-A sshrate -m <!check2> -j DROP
-A sshrate -m <check3> -j ACCEPT
or put all checks in the same rule if possible :
-A sshrate -m <check1> -m <check2> -m <check3> -j ACCEPT
or cascade chains :
-A sshrate -m <check1> -j check1ok
-A check1ok -m <check2> -j check2ok
-A check2ok -m <check2> -j ACCEPT
next prev parent reply other threads:[~2009-09-07 7:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-07 6:58 A very basic chain question J. Bakshi
2009-09-07 7:47 ` Pascal Hambourg [this message]
2009-09-07 8:07 ` 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=4AA4BAA4.2060004@plouf.fr.eu.org \
--to=pascal.mail@plouf.fr.eu.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox