From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pascal Hambourg Subject: Re: A very basic chain question Date: Mon, 07 Sep 2009 09:47:48 +0200 Message-ID: <4AA4BAA4.2060004@plouf.fr.eu.org> References: <4AA4AF15.8000602@infoservices.in> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <4AA4AF15.8000602@infoservices.in> Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: netfilter@vger.kernel.org Hello, J. Bakshi a =E9crit : >=20 > check limit ( say 10/min) --> check connlimit ( 2 per ip ) --> check > hashlimit ( 2 attempt per min) ---> ACCEPT. >=20 > I have made a chain called sshrate but don't find the way to append t= he > rules in that chain one by one. If I simply append the rules as accep= t > 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 accep= t > the valid packets. Could any one enlighten me in that direction ? DROP (or REJECT) packets which fail early checks if possible : -A sshrate -m -j DROP -A sshrate -m -j DROP -A sshrate -m -j ACCEPT or put all checks in the same rule if possible : -A sshrate -m -m -m -j ACCEPT or cascade chains : -A sshrate -m -j check1ok -A check1ok -m -j check2ok -A check2ok -m -j ACCEPT