* Limit module accept negation?
@ 2005-01-11 1:08 Jorge Agrelo
2005-01-12 14:20 ` Samuel Jean
0 siblings, 1 reply; 7+ messages in thread
From: Jorge Agrelo @ 2005-01-11 1:08 UTC (permalink / raw)
To: netfilter
Can I replace this two rules
iptables -A INPUT -p tcp --syn -m limit --limit 1/s --limit-burst 4 -j ACCEPT
iptables -A INPUT -p tcp --syn -j DROP
For only this one? (Using negation)
iptables -A INPUT -p tcp --syn -m limit ! --limit 1/s --limit-burst 4 -j DROP
Thanks in advanced
**********************************
CTO: Eng. Jorge Agrelo O.
WEb: www.novadevices.com
E-Mail: jagrelo@novadevices.com
Phone: (593-2) 225-7711 ext. 105
Av. Brasil N45-08 y Condor, Quito Ecuador
**********************************
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Limit module accept negation?
2005-01-11 1:08 Limit module accept negation? Jorge Agrelo
@ 2005-01-12 14:20 ` Samuel Jean
2005-01-14 0:08 ` Jorge Agrelo
0 siblings, 1 reply; 7+ messages in thread
From: Samuel Jean @ 2005-01-12 14:20 UTC (permalink / raw)
To: jagrelo; +Cc: netfilter
On Mon, January 10, 2005 8:08 pm, Jorge Agrelo said:
> Can I replace this two rules
>
> iptables -A INPUT -p tcp --syn -m limit --limit 1/s --limit-burst 4 -j
> ACCEPT
> iptables -A INPUT -p tcp --syn -j DROP
>
> For only this one? (Using negation)
>
> iptables -A INPUT -p tcp --syn -m limit ! --limit 1/s --limit-burst 4 -j
> DROP
Unfortunately, you can't without a bit of hacking.
If it happens you would, just grab ipt_limit.c and search for:
/* We're underlimit */
Change the return codes so it returns 0 when 'underlimit', otherwise, 1.
Am sorry if this is straigh, I am at work.
Note that this won't add '!' support but just doesn't match unless it
bursts the limit.
By the way, do you want to limit as soon as you receive more than 1/s packet
regardless of the source address?
>
> Thanks in advanced
HTH,
Samuel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Limit module accept negation?
2005-01-12 14:20 ` Samuel Jean
@ 2005-01-14 0:08 ` Jorge Agrelo
2005-01-14 1:20 ` Samuel Jean
0 siblings, 1 reply; 7+ messages in thread
From: Jorge Agrelo @ 2005-01-14 0:08 UTC (permalink / raw)
To: Samuel Jean; +Cc: netfilter
Hi Samuel
Yes, I want to limit (drop) as soon as we receive more than 1/s packet
regardless of the source address?, Is there any other way to do that without using
limit match with negation?
Regards
On 12 Jan 2005 at 9:20, Samuel Jean wrote:
> On Mon, January 10, 2005 8:08 pm, Jorge Agrelo said:
> > Can I replace this two rules
> >
> > iptables -A INPUT -p tcp --syn -m limit --limit 1/s --limit-burst 4 -j
> > ACCEPT
> > iptables -A INPUT -p tcp --syn -j DROP
> >
> > For only this one? (Using negation)
> >
> > iptables -A INPUT -p tcp --syn -m limit ! --limit 1/s --limit-burst 4 -j
> > DROP
>
> Unfortunately, you can't without a bit of hacking.
> If it happens you would, just grab ipt_limit.c and search for:
>
> /* We're underlimit */
>
> Change the return codes so it returns 0 when 'underlimit', otherwise, 1.
> Am sorry if this is straigh, I am at work.
> Note that this won't add '!' support but just doesn't match unless it
> bursts the limit.
>
> By the way, do you want to limit as soon as you receive more than 1/s packet
> regardless of the source address?
>
> >
> > Thanks in advanced
>
> HTH,
>
> Samuel
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-01-14 15:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-11 1:08 Limit module accept negation? Jorge Agrelo
2005-01-12 14:20 ` Samuel Jean
2005-01-14 0:08 ` Jorge Agrelo
2005-01-14 1:20 ` Samuel Jean
2005-01-14 1:24 ` Samuel Jean
2005-01-14 14:36 ` Jorge Agrelo
2005-01-14 15:06 ` Samuel Jean
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.