ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label Syn flood attack. Show all posts
Showing posts with label Syn flood attack. Show all posts

2009/12/22

How to prevent the Syn flood attack?

1)Enable SYN cookies mechanism in the server.

SYN cookies mechanism can be enabled in the following way:

[root@server src]## echo 1 > /proc/sys/net/ipv4/tcp_syncookies

2)Increase the backlog queue:-

A tcp_max_backlog variable_defines how many half-open connections can be kept by the backlog queue.

change the default size of the backlog queue to 2048 by executing the the sysctl command:

[root@server src]# sysctl -w net.ipv4.tcp_max_syn_backlog="2048"