Apache Server guard against Dos

Source: Internet
Author: User

The Apache server's defenses against denial of service attacks are mainly achieved through the software Apache DoS evasive maneuvers Module. It is a mod_access replacement software that can be used against Dos attacks. The software can quickly deny duplicate requests from the same address to the same URL, by querying a hash table of each child process inside. to the site http://online/. securityfocus.com/data/tools/dospatch.tar.gz Download the software. The configuration of the software installation can be viewed in the Linux Chinese home page http://www.linux.gov.cn/Apache performance and Security Guide, the process is relatively simple, limited to the length of this is not covered. You can also use powerful Linux system commands to protect against Dos attacks.

Netstat-an | Grep-i "Server IP Address: 80" | awk {print $6} | Sort | uniq-c | Sort-n

This command automatically counts the number of States of the TCP connection, and if the SYN_RECV is high, it is not possible to exclude a denial-of-service attack based on the TCP protocol. Then you need to open tcp_syncookies:

Echo 1 >/proc/sys/net/ipv4/tcp_syncookies

If there is no/proc/sys/net/ipv4/tcp_syncookies, the kernel does not support syncookies and needs to recompile the kernel while reducing the number of SYN retries.

echo "1" >/proc/sys/net/ipv4/tcp_syn_retriesecho "1" >/proc/sys/net/ipv4/tcp_synack_retries

At the same time, increase syn_backlog to ensure user access:

echo "2048" >/proc/sys/net/ipv4/tcp_max_syn_backlog

Apache Server guard against Dos

Related Article

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.