Page tree
Skip to end of metadata
Go to start of metadata

 

This document is for a previous release of cPanel & WHM. To view our latest documentation, visit our Home page.

For cPanel & WHM 11.46

(Home >> Security Center >> ModSecurity™ Tools)

Overview

The ModSecurity Tools™ interface allows you install and manage your ModSecurity rules.

Note:

You must install the ModSecurity Apache module in order to use this feature. To install the ModSecurity Apache module, use WHM's EasyApache (Apache Update) interface (Home »Software »EasyApache (Apache Update)).

Hits List

Use the Hits List section of the interface to view the history of rule events that have occurred on your Apache server. 

Custom Rules

Important:

 To update the Apache server with your changes, select the Deploy & Restart Apache checkbox or click Deploy & Restart Apache at the top of the interface.

Note:

For information on how to create your own ModSecurity rules, see the ModSecurity Reference Manual.

Add a custom rule

To add a custom rule, perform the following steps:

  1. Click Custom Rules List.
  2. Click Add Rule.
  3. Enter the rule in the Rule Text text box.
  4. Click Save.

Edit all custom rules

To edit all of your custom rules, perform the following steps.

  1. Click Custom Rules.
  2. Click Edit Rules.
  3. Enter the desired changes in the Rules text box.
  4. Click Save.

Edit a custom rule

To edit a custom rule, perform the following steps:

  1. Click Custom Rules List.
  2. Click Edit for the rule that you wish to update.
  3. Make the desired changes in the Rule Text text box.
  4. Click Save.

Enable or disable a custom rule

To enable or disable a ModSecurity rule, perform the following steps:

  1. Click Custom Rules List.
  2. Locate the rule that you wish to enable or disable.

    1. Click Enable to enable the rule.

    2. Click Disable to disable the rule.

Delete a custom rule

To delete a custom rule, perform the following steps:

  1. Click Custom Rules List.
  2. Click Delete for the rule that you wish to delete.
  3. Click Delete to confirm your action.

Note:

  • To reset the ModSecurity database user password, run the command prompt as the root user.

    /usr/local/cpanel/bin/modsecpass
  • Run the following command to access the help file:

    /usr/local/cpanel/bin/modsecpass --help

     

  •  To create the ModSecurity database manually, run the following command.

    /usr/local/cpanel/scripts/setup_modsec_db