From: "J. Bakshi" <joydeep@infoservices.in>
To: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
Cc: netfilter@vger.kernel.org
Subject: Re: A very basic chain question
Date: Mon, 07 Sep 2009 13:37:28 +0530 [thread overview]
Message-ID: <4AA4BF40.1090105@infoservices.in> (raw)
In-Reply-To: <4AA4BAA4.2060004@plouf.fr.eu.org>
Pascal Hambourg wrote:
> 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
>
Very nice. The second one is really nice.
many many thanks.
> or cascade chains :
>
> -A sshrate -m <check1> -j check1ok
> -A check1ok -m <check2> -j check2ok
> -A check2ok -m <check2> -j ACCEPT
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
prev parent reply other threads:[~2009-09-07 8:07 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
2009-09-07 8:07 ` J. Bakshi [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=4AA4BF40.1090105@infoservices.in \
--to=joydeep@infoservices.in \
--cc=netfilter@vger.kernel.org \
--cc=pascal.mail@plouf.fr.eu.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