What Is SYN Attack ? How To Control It In Linux And CPanel Servers
SYN is the most common type of DoS(Denial of Services) attack. In this sort of attacks, hackers use a large number of spoofed IP addresses to send TCP SYN packets to the target machines. Once target machine starts accepting such connections, it goes out of resources and system becomes unresponsive to real requests.
How To Check System Is Under SYN Attack
If you doubt that your system is under SYN attack, then run the following command to verify it.
netstat -an |grep :80 |more
You must see a list of SYN Packets if you are under attack, otherwise the output will be normal. A SYN effected system shows out as below:
tcp 0 0 56.34.53.58:80 211.48.6.244:1048 SYN_RECV tcp 0 0 12.04.46.88:80 128.223.93.135:1167 SYN_RECV tcp 0 0 49.44.58.78:80 194.15.197.170:1192 SYN_RECV tcp 0 0 88.34.89.66:80 199.155.53.109:1039 SYN_RECV tcp 0 0 88.43.44.32:80 4.168.188.28:1048 SYN_RECV
How To control SYN Attack
Make sure that you have firewall propely setup and the best way is to limit the total number of TCP connections on your system. Following command can help you in this matter.
iptables -N syn_flood iptables -A INPUT -p tcp --syn -j syn_flood iptables -A syn_flood -m limit --limit 1/s --limit-burst 3 -j RETURN iptables -A syn_flood -j DROP
On a cPanel based servers, it is also recommended that you should have latest kernel version for your operating system. Cheers!










