How to check if a Linux server is compromised by a DDoS attack

Source: Internet
Author: User

原文地址:http://www.phpthinking.com/archives/427

Log on to your server and execute the following command with the root user , using it you can check whether your server is in DDoS attack or not:
netstat-anp |grep ' tcp\|udp ' | awk ' {print $} ' | Cut-d:-f1 | Sort | uniq-c | Sort–n
This command will show that the logged on is the maximum number of IPs connected to the server List.

ddos become more complex, Because attackers use fewer connections, more IP-attacking servers, you get fewer connections, even if your server is attacked. It is important that you check the current active connection information for your server and execute the following command:
netstat-n | grep:80 |wc–l
The above command will show all active connections that open your server.

You can also use the following command:
netstat-n | grep:80 | grep SYN |wc–l

如果第二个命令的结果是100或以上,那么服务器可能被同步攻击。

一旦你获得了攻击你的服务器的IP列表,你可以很容易地阻止它。

同构下面的命令来阻止IP或任何其他特定的IP:

route add ipaddress reject

一旦你在服务器上组织了一个特定IP的访问,你可以检查对它的阻止豆腐有效

通过使用下面的命令:

route -n |grep IPaddress

您还可以通过使用下面的命令,用iptables封锁指定的IP。

iptables -A INPUT 1 -s IPADRESS -j DROP/REJECT

service iptables restart

service iptables save

After the above command is executed, stop the HTTPD connection and restart the HTTPD service

使用下面的命令:

killall -KILL httpd

service httpd startssl

How to check if a Linux server is compromised by a DDoS attack

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.