Knowledge Base
MilesWeb / DirectAdmin, How-Tos

How to Enable and Disable ModSecurity Rules with DirectAdmin?

Approx. read time : 2 min

Watch this video for a step by step process on how to Enable and Disable ModSecurity Rules with DirectAdmin

ModSecurity or Modsec is an essential security software application that is mandatory for server security. It is a web application that enables a firewall for your server. Admins can do tasks like real-time web application monitoring, full traffic logging, etc. and get full access control over rules to protect your server with the Modsec toolkit. It can potentially block the common code injection attacks enhancing the server security.

In DirectAdmin version 1.61.4, a new feature in ModSecurity enables users to skip some ModSecurity Rules. Users can also fully disable ModSecurity when required.

If you continue reading, you will understand how to enable or disable ModSecurity for your domain with the DirectAdmin dashboard.

This article is exclusive for the users of version 1.61.4 of DirectAdmin.

To Enable or Disable ModSecurity Rules with DirectAdmin

1. Log in to your DirectAdmin dashboard.

2. Scroll to the Advanced Features section and click on the ModSecurity icon.

You will see the ModSecurity dashboard where you can manage the Status and view the Log.

3. You have to open the Status & Disabled Rules tab.

4. You have to tick the On or Off radio button for SecRuleEngine to enable or disable the ModSecurity tool and click the SAVE button.

The system will generate a message saying ModSecurity Rules Saved.

ModSecurity is very sensitive when it comes to software security, to the point that a rule may trigger a false-positive. Commonly, such issues occur in some Content Management Systems (CMS) like WordPress. You can disable such ModSecurity Rule ID instead of shutting off the entire tool application. The Disabled Rules section will allow you to search and disable a single Rule ID.

To Disable/Enable a ModSecurity Rule ID in DirectAdmin

Enter the Rule ID in the ID field of the Disabled Rules section. Then, click the DISABLE RULE button.

A success message will appear at the bottom of the screen: Skipped rule added and, the system will add the Rule ID in the list under the  ModSecurity Disabled Rules section.

To re-enable the disabled ModSecurity Rule, select the checkbox next to the Rule ID and click the Delete button.

The system will flash a message at the bottom of the screen saying selected skipped rules removed. It will also remove the Rule ID from the list of ModSecurity Disabled Rules section.

 

Prasad Khartadkar
Prasad is a business grad specialized in Marketing. He has garnered experience as a technical content writer and a digital marketer that he brings out in his work. He likes reading classics and travel in his free time.
Need help? We’re always here for you.