Use the Mod_Security and Mod_evasive modules to protect Apache (1)

Source: Internet
Author: User

Use the Mod_Security and Mod_evasive modules to protect Apache (1)

For people in the host hosting industry, or if you host your own server and expose the server to the Internet, protecting the system from attackers is a top priority.

Mod_security and mod_evasive are two important tools that can be used to protect Web servers from brute force attacks or distributed denial of service (DDoS) attacks. Mod_security is an open-source Intrusion Detection and Prevention engine for Web applications. It is seamlessly integrated with Web servers.

As the name suggests, mod_evasive provides the avoidance function. In addition, it can act as a protective umbrella when being attacked to protect Web servers from such threats.

Install Mod_Security and Mod_Evasive to protect Apache

In this article, we will discuss how to install and configure these two modules on RHEL/CentOS 6 and 7, and Fedora 21-15, and make them run together with Apache. In addition, we simulate attacks to verify that the server responds accordingly.

This document assumes that you have installed the LAMP server on the system. If no installation is available, please refer to this Article "Install LAMP architecture in RHEL/CentOS 7" Before proceeding to the next step: http://www.tecmint.com/install-lamp-in-centos-7 /.

If you are running RHEL/CentOS 7 or Fedora 21, you also need to set iptables to the default firewall front-end instead of setting firewalld to the default firewall front-end. We do this to use the same tool in RHEL/CentOS 7/6 and dora 21.

Step 1: Install Iptables firewall on RHEL/CentOS 7 and Fedora 21

To start, stop and disable firewalld:

# Systemctl stop firewalld

# Systemctl disable firewalld

Disable the Firewalld Service

Then, install the iptables-services package before enabling iptables:

# Yum update & yum install iptables-services

# Systemctl enable iptables

# Systemctl start iptables

# Systemctl status iptables

Install Iptables Firewall


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.