What is the ModSecurity, how it is different from CSF and how to configure ModSecurity on Centos Web Panel (CWP)? - CloudMinister

What is the ModSecurity, how it is different from CSF and how to configure ModSecurity on Centos Web Panel (CWP)?

ModSecurity

ModSecurity is an open source web based application firewalls are deployed to establish an external security layer to prevent web servers from various attacks. ModSecurity is also supported by different web servers like: nginx, apache and IIS.

It help to protect from various attacks happens in our surrounding like:

Session hijacking, SQL injection, trojans, etc.

ModSecurity is different from CSF as CSF provides server security for FTP, SSH and various Ports but there is no protection for web servers that’s why ModSecurity modules help to protect web servers.

Configure ModSecurity

To configure ModSecurity in CWP, first you need to login in CWP admin panel with the 2087 port. Then select Security drop down option and inside it select ModSecurity. 

In CWP only one ModSecurity is freely available and the other two come with CWP Pro version, click on Install ModSecurity Configuration and it takes some time.

After the installation is completed it shows a log file, now you must restart the Apache server to see the effect.

Now you can also check the error logs by clicking on the Error Log tab on the top.

Most Common Errors

If you get 403 Forbidden messages that means that the ModSecurity rules work, now check the error log file and search for the rule IDs are displayed.

To solve the above problem copy the rule ID and click on accounts and click on Edit Rules.

Make entry in edit file like this:

SecRuleRemoveById 970091

Save the changes.

 

After the above changes in file the error 403 will be resolved.

CONCLUSION-

The above configuration shows how to configure ModSecurity in CWP and enhanced the web based security.

 

Learn how to scale, manage, and optimize your applications with a SLB. Read our solution brief "Get More from Your Enterprise Network".

DOWNLOAD SOLUTION BRIEF

Get started with CloudMinister Today