What is ModSecurity Rule?

What is ModSecurity Rule?

The OWASP ModSecurity Core Rule Set (CRS) is a set of generic attack detection rules for use with ModSecurity or compatible web application firewalls. The CRS aims to protect web applications from a wide range of attacks, including the OWASP Top Ten, with a minimum of false alerts.

How do I disable a ModSecurity rule?

You can disable ModSecurity security by setting the values of the “SecRuleEngine” configuration.

Where are ModSecurity rules?

Upon installation, ModSecurity is set to log events according to default rules. You’ll need to edit the configuration file to adjust the rules to detect and block traffic. The default configuration file is /etc/modsecurity/modsecurity. conf-recommended.

How do you whitelist in ModSecurity?

From the user whitelist home page, highlight the domain you want to whitelist the rule for and click Modify domain whitelist. When the page opens, copy and paste the rule ID into the ModSecurity rule ID list. Click Save whitelist for (yourdomain).com and Apache will restart to whitelist the rule ID.

Should I disable ModSecurity?

ModSecurity helps protect your site from brute force attacks and, by default, automatically runs on all new accounts. ModSecurity should usually remain on. In certain situations, such as a WordPress admin lockdown caused by brute force attacks, you may need to temporarily deactivate ModSecurity to resolve an issue.

What is mod_security2?

mod_security2 is a web application firewall (WAF). On certain servers, this module can be added in the Apache Options interface. To learn about adding modules to your VPS or Dedicated server, see our How to Add and Remove Your Apache Modules article.

How do I disable ModSecurity in cPanel?

Disable ModSecurity for Individual Domains

  1. Log into cPanel.
  2. Choose ModSecurity listed under Security.
  3. Select the domain you are working with and switch ModSecurity from On to Off.
  4. Wait for the pop-up telling you that ModSecurity has been disabled.
  5. Troubleshoot the issue that you are having.

What is ModSecurity in cPanel?

ModSecurity is a web application firewall. It monitors incoming web traffic for threats in real-time, blocking malicious connections before they reach applications.

How do I configure ModSecurity?

Configure ModSecurity

  1. Copy the default ModSecurity configuration file to a new file: Copy.
  2. Edit the ModSecurity configuration file with Vi, Vim, Emacs, or Nano. Copy.
  3. Near the top of the file, you’ll see SecRuleEngine DetectionOnly . Change DetectionOnly to On .
  4. Save changes.
  5. Restart Apache: Copy.

How do I whitelist a domain in WHM?

Log into WHM as the ‘root’ user. Type “cphulk” in the search box, then click the cPHulk Brute Force Protection link in the Security Center section. Click the Whitelist Management tab. Add the IP addresses that you want to whitelist to the New Whitelist Records section.

How do you whitelist IP address in Plesk?


  1. Log in to Plesk.
  2. Go to Tools & Settings > Mail Server Settings.
  3. Switch to the White List tab.
  4. Click Add Network.
  5. Specify an IP address or range of IP addresses from which emails should always be accepted. Click OK.
  6. Repeat steps 3 and 4 to add as many addresses as required.

Should I use ModSecurity?

For ecommerce purposes, ModSecurity is an essential piece of PCI DSS compliance, helping satisfy Requirement 6.6 by helping shield your site against external threats. Therefore, we strongly advise against disabling or uninstalling the module.

How do I know if ModSecurity is installed?

How Do I Know if I have ModSecurity Installed? ¶

  1. Find the “Plugins” section in the left navigation.
  2. If ModSecurity is installed, you’ll see Mod Security listed under your plugins.

How do I set up WAF rules?

  1. Step 1: Set up AWS WAF.
  2. Step 2: Create a Web ACL.
  3. Step 3: Add a string match rule.
  4. Step 4: Add an AWS Managed Rules rule group.
  5. Step 5: Finish your web ACL configuration.
  6. Step 6: Clean up your resources.

How do I whitelist my IP in cPanel?

How to White CodeGuard IP addresses in cPanel:

  1. Navigate to Remote SQL. In, cPanel, find the My Databases section, then select “Remote SQL.”
  2. Enter IPs. Enter the IP Address(es) you want to list in the given field: Whitelist the following IP addresses: 236.233. 236.233. 174.91. 174.153. 212. 174.115. 171.
  3. Click Add Host.

How do I whitelist an IP?

Whitelisting is a proactive method of allowing specific IP addresses to avoid blockage by your firewall security rules and access your website….List the crawl IP addresses under the IP Access Rules.

  1. Enter the IP address.
  2. Choose Whitelist as the action.
  3. Choose the website the whitelisting rules apply to.

How do I assign a dedicated IP to Plesk?

Assign IP Address

  1. Log into the Plesk Server Administration Panel and click on Domains.
  2. Click on the domain you’d like to modify.
  3. Click on Web Hosting Access.
  4. Select the new IP address in the drop down menu labeled IP address.
  5. Click the OK button located at the bottom of the page to save your changes.

How do I find my IP block Plesk?


  1. Log into Plesk.
  2. Go to Tools & Settings > Firewall.
  3. (For Mail service) Go to Tools & Settings > Mail Server Settings > Black list tab and check if the IP address is listed there.
  4. (For Plesk for Linux) Go to Tools & Settings > IP Address Banning (Fail2Ban) and check the list of Banned IP Addresses.

These lines will provide a section that looks like this: [id “950004”] The number is the ID of the ModSecurity rule that you will disable. You can then enter the following line in an applicable .htaccess file (replacing the ID of your matched error with the 950004 example used below):

Is ModSecurity beyond the scope of these guiding principles?

However, let’s be clear: certain aspects of ModSecurity can be considered to be beyond the scope of these guiding principles.

How does ModSecurity detect and defend web applications?

To identify and defend web applications against attacks, ModSecurity will run checks on any request to the web server and all associated responses from the server against the set of rules. Should checks succeed, the HTTP request will be sent to the website to retrieve the relevant content.

Is ModSecurity hard to use?

If it sounds complex, don’t worry. Anyone with experience of ModSecurity will attest that it’s a flexible toolkit, with no hard and fast rules telling you how you should use it. Generally, ModSecurity leaves you free to decide how you take advantage of the features available instead.