* iptables limit-burst trouble
@ 2003-06-09 2:22 Tsuyoshi Takada
2003-06-10 3:04 ` Tsuyoshi Takada
2003-06-10 4:35 ` Philip Craig
0 siblings, 2 replies; 4+ messages in thread
From: Tsuyoshi Takada @ 2003-06-09 2:22 UTC (permalink / raw)
To: netfilter
Hi,
I want to limit Web DoS attack.
I have set the following but it does not work well.
iptables -N flood-chk
iptables -A INPUT -p tcp --dport 80 --syn -j flood-chk
iptables -A flood-chk -m limit --limit 1/sec --limit-burst 2 -j RETURN
iptables -A flood-chk -j LOG --log-prefix "IPTABLES HTTP FLOOD-PACKET"
iptables -A flood-chk -j DROP
After I accessed to my web site,
I pushed reload button of my web browser repeatedly but
I was not denied by iptables.
Why?
regards,
--
Tsuyoshi Takada <acroyear@gmx.ch>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iptables limit-burst trouble
2003-06-09 2:22 iptables limit-burst trouble Tsuyoshi Takada
@ 2003-06-10 3:04 ` Tsuyoshi Takada
2003-06-10 4:35 ` Philip Craig
1 sibling, 0 replies; 4+ messages in thread
From: Tsuyoshi Takada @ 2003-06-10 3:04 UTC (permalink / raw)
To: Tsuyoshi Takada; +Cc: netfilter
Is there anyone who teach me ...? (;__;)
--
Tsuyoshi Takada <acroyear@gmx.ch>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iptables limit-burst trouble
2003-06-09 2:22 iptables limit-burst trouble Tsuyoshi Takada
2003-06-10 3:04 ` Tsuyoshi Takada
@ 2003-06-10 4:35 ` Philip Craig
1 sibling, 0 replies; 4+ messages in thread
From: Philip Craig @ 2003-06-10 4:35 UTC (permalink / raw)
To: Tsuyoshi Takada; +Cc: netfilter
Tsuyoshi Takada wrote:
> I want to limit Web DoS attack.
>
> I have set the following but it does not work well.
>
> iptables -N flood-chk
> iptables -A INPUT -p tcp --dport 80 --syn -j flood-chk
> iptables -A flood-chk -m limit --limit 1/sec --limit-burst 2 -j RETURN
> iptables -A flood-chk -j LOG --log-prefix "IPTABLES HTTP FLOOD-PACKET"
> iptables -A flood-chk -j DROP
>
> After I accessed to my web site,
> I pushed reload button of my web browser repeatedly but
> I was not denied by iptables.
> Why?
These rules work for me. Note however that if you hit the limit,
your browser will automatically retransmit and succeed if it is at
least 1 second later. You should notice a delay in loading the
page when the browser has to retransmit. You should also get the
syslog message.
If you change the DROP to a REJECT, then your browser will display
'connection refused' when it reaches the limit, rather than
retransmitting. (Using REJECT isn't good for protection against
a DoS attack though, just do this for testing that the rules
are working.)
I would also recommend putting a limit on the rule for the LOG
message, otherwise it is possible to flood your logs.
--
Philip Craig - philipc@snapgear.com - http://www.SnapGear.com
SnapGear - Custom Embedded Solutions and Security Appliances
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: iptables limit-burst trouble
@ 2003-06-10 3:25 George Vieira
0 siblings, 0 replies; 4+ messages in thread
From: George Vieira @ 2003-06-10 3:25 UTC (permalink / raw)
To: Tsuyoshi Takada; +Cc: netfilter
my example:
$IPTABLES -A PREROUTING -i $EXTDEV -t nat -d $DESTIP -m limit --limit 3/minute --limit-burst 3 -j ACCEPT
$IPTABLES -A PREROUTING -i $EXTDEV -t nat -d $DESTIP -j DROP
work with that(add ports for both etc)... it should accept anything to it's destination ip for 3 packets per minute and drop the rest...
I don't have your original mail so you'll need to tweak to your needs.
Thanks,
____________________________________________
George Vieira
Systems Manager
georgev@citadelcomputer.com.au
Citadel Computer Systems Pty Ltd
http://www.citadelcomputer.com.au
Phone : +61 2 9955 2644
HelpDesk: +61 2 9955 2698
-----Original Message-----
From: Tsuyoshi Takada [mailto:acroyear@gmx.ch]
Sent: Tuesday, June 10, 2003 1:04 PM
To: Tsuyoshi Takada
Cc: netfilter@lists.netfilter.org
Subject: Re: iptables limit-burst trouble
Is there anyone who teach me ...? (;__;)
--
Tsuyoshi Takada <acroyear@gmx.ch>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-10 4:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-09 2:22 iptables limit-burst trouble Tsuyoshi Takada
2003-06-10 3:04 ` Tsuyoshi Takada
2003-06-10 4:35 ` Philip Craig
-- strict thread matches above, loose matches on Subject: below --
2003-06-10 3:25 George Vieira
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.