* sync flood and resource utilization .
@ 2010-02-27 5:35 ratheesh k
2010-02-27 7:09 ` lists
2010-02-28 9:19 ` Mart Frauenlob
0 siblings, 2 replies; 5+ messages in thread
From: ratheesh k @ 2010-02-27 5:35 UTC (permalink / raw)
To: netfilter
iptables -A INPUT -j DROP .
iptables -A OUTPUT -j ACCEPT
When i syn flooded my desktop . I can see all pkts are getting
rejected by the rule . But system becomes slow beacuse of this . Is
there any way to make system fast ? will black listing will help ?
Thanks,
Ratheesh
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sync flood and resource utilization .
2010-02-27 5:35 sync flood and resource utilization ratheesh k
@ 2010-02-27 7:09 ` lists
2010-02-27 12:10 ` ratheesh k
2010-02-28 9:19 ` Mart Frauenlob
1 sibling, 1 reply; 5+ messages in thread
From: lists @ 2010-02-27 7:09 UTC (permalink / raw)
To: netfilter
On Sat, 2010-02-27 at 11:05 +0530, ratheesh k wrote:
> iptables -A INPUT -j DROP .
> iptables -A OUTPUT -j ACCEPT
>
> When i syn flooded my desktop . I can see all pkts are getting
> rejected by the rule . But system becomes slow beacuse of this . Is
> there any way to make system fast ? will black listing will help ?
IIRC syn_cookies were meant to deal with that.
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
http://www.securityfocus.com/infocus/1729
http://www.unixresources.net/linux/lf/57/archive/00/00/09/85/98546.html
--
Rob
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sync flood and resource utilization .
2010-02-27 7:09 ` lists
@ 2010-02-27 12:10 ` ratheesh k
0 siblings, 0 replies; 5+ messages in thread
From: ratheesh k @ 2010-02-27 12:10 UTC (permalink / raw)
To: lists; +Cc: netfilter
since i am dropping all sync packets , there wont be any connection
ins SYNC ACCEPT state ( netstat ) .
On Sat, Feb 27, 2010 at 12:39 PM, <lists@sterenborg.info> wrote:
> On Sat, 2010-02-27 at 11:05 +0530, ratheesh k wrote:
>> iptables -A INPUT -j DROP .
>> iptables -A OUTPUT -j ACCEPT
>>
>> When i syn flooded my desktop . I can see all pkts are getting
>> rejected by the rule . But system becomes slow beacuse of this . Is
>> there any way to make system fast ? will black listing will help ?
>
> IIRC syn_cookies were meant to deal with that.
>
> echo 1 > /proc/sys/net/ipv4/tcp_syncookies
>
> http://www.securityfocus.com/infocus/1729
> http://www.unixresources.net/linux/lf/57/archive/00/00/09/85/98546.html
>
>
> --
> Rob
>
>
> --
> 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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sync flood and resource utilization .
2010-02-27 5:35 sync flood and resource utilization ratheesh k
2010-02-27 7:09 ` lists
@ 2010-02-28 9:19 ` Mart Frauenlob
2010-02-28 10:50 ` J. Bakshi
1 sibling, 1 reply; 5+ messages in thread
From: Mart Frauenlob @ 2010-02-28 9:19 UTC (permalink / raw)
To: netfilter
On 27.02.2010 06:36, netfilter-owner@vger.kernel.org wrote:
> iptables -A INPUT -j DROP .
> iptables -A OUTPUT -j ACCEPT
>
> When i syn flooded my desktop . I can see all pkts are getting
> rejected by the rule . But system becomes slow beacuse of this . Is
> there any way to make system fast ? will black listing will help ?
>
g00gle is your friend:
search: syn flood protection iptables
or:
syn flood protection iptables hashlimit recent blacklist
you can do some with a simple 'limit'.
or more complex with 'hashlimit' and 'recent'.
Best regards
Mart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: sync flood and resource utilization .
2010-02-28 9:19 ` Mart Frauenlob
@ 2010-02-28 10:50 ` J. Bakshi
0 siblings, 0 replies; 5+ messages in thread
From: J. Bakshi @ 2010-02-28 10:50 UTC (permalink / raw)
To: netfilter
On Sun, 28 Feb 2010 10:19:03 +0100
Mart Frauenlob <mart.frauenlob@chello.at> wrote:
> On 27.02.2010 06:36, netfilter-owner@vger.kernel.org wrote:
> > iptables -A INPUT -j DROP .
> > iptables -A OUTPUT -j ACCEPT
> >
> > When i syn flooded my desktop . I can see all pkts are getting
> > rejected by the rule . But system becomes slow beacuse of this . Is
> > there any way to make system fast ? will black listing will help ?
> >
>
I use the following
[..........]
# Check hashlimit-htable-expire after 5 min ( 300000 mili second )
iptables -N syn-flood
iptables -A INPUT -i $IFACE -p tcp --syn -j syn-flood
iptables -A syn-flood -p tcp --syn -m hashlimit \
--hashlimit 200/sec --hashlimit-burst 3 --hashlimit-htable-expire
300000 \ --hashlimit-mode srcip --hashlimit-name testlimit -j RETURN
# Drop bad IP and put then in blacklist
iptables -A syn-flood -m recent --name blacklist --set -j DROP
iptables -A INPUT -j syn-flood
[.....]
This rule should come after all your incoming rules. This rule is also effective against apache benchmark attack and ping flood also.
regards
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-28 10:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-27 5:35 sync flood and resource utilization ratheesh k
2010-02-27 7:09 ` lists
2010-02-27 12:10 ` ratheesh k
2010-02-28 9:19 ` Mart Frauenlob
2010-02-28 10:50 ` J. Bakshi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox