---
id: "modsecurity"
type: "component"
kind: "waf"
provider: "default"
category: "security"
docs: "https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-%28v3.x%29"
url: "https://localhost:3000/catalogue/components/modsecurity"
---

# ModSecurity

SecLang web application firewall engine for nginx, Apache and IIS; the rule engine is off until configured.

| | |
|---|---|
| Provider | [default](https://localhost:3000/catalogue?provider=default) |
| Kind | [Web application firewall](https://localhost:3000/catalogue/kinds/waf) |
| Category | Security |
| Official docs | [https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-%28v3.x%29](https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-%28v3.x%29) |

## Properties

| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| `auditLog` | boolean | — | no | false | inherited |
| `botProtection` | boolean | — | no | — | **false** |
| `connector` | enum | `nginx`, `apache`, `iis` | no | "nginx" | inherited |
| `coreRuleSetInstalled` | boolean | — | no | false | inherited |
| `customRuleCount` | integer | — | no | — | inherited |
| `managed` | boolean | — | no | false | **false** |
| `managedRuleSet` | string | — | no | — | inherited |
| `mode` | enum | `detection`, `prevention`, `off` | no | — | **"off"** |
| `rateLimiting` | boolean | — | no | — | **false** |
| `ruleEngine` | enum | `off`, `detection-only`, `on` | no | "off" | inherited |

Bold values are the ones this component pins.

## Rules that apply · 0

No rule selects this kind or its category.

## Other products of the same kind · 13

- [Web Application Firewall](https://localhost:3000/catalogue/components/alibaba-waf.md) `alibaba-waf` — alibabacloud
- [AWS WAF web ACL](https://localhost:3000/catalogue/components/aws-waf.md) `aws-waf` — aws
- [AWS WAF Classic](https://localhost:3000/catalogue/components/aws-waf-classic.md) `aws-waf-classic` — aws
- [Azure Web Application Firewall](https://localhost:3000/catalogue/components/azure-web-application-firewall.md) `azure-web-application-firewall` — azure
- [Firewall for AI](https://localhost:3000/catalogue/components/cloudflare-firewall-for-ai.md) `cloudflare-firewall-for-ai` — cloudflare
- [Cloudflare WAF](https://localhost:3000/catalogue/components/cloudflare-waf.md) `cloudflare-waf` — cloudflare
- [Coraza](https://localhost:3000/catalogue/components/coraza.md) `coraza` — default
- [Imperva Application Security](https://localhost:3000/catalogue/components/imperva.md) `imperva` — default
- [NAXSI](https://localhost:3000/catalogue/components/naxsi.md) `naxsi` — default
- [Generic web application firewall](https://localhost:3000/catalogue/components/waf.md) `waf` — default
- [Google Cloud Armor](https://localhost:3000/catalogue/components/google-cloud-armor.md) `google-cloud-armor` — gcp
- [reCAPTCHA Enterprise](https://localhost:3000/catalogue/components/google-recaptcha-enterprise.md) `google-recaptcha-enterprise` — gcp
- [Web Application Firewall](https://localhost:3000/catalogue/components/oci-waf.md) `oci-waf` — oci

## Use it in a design

```yaml
nodes:
  - { id: "modsecurity", component: "modsecurity" }
```

## Source (`component` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../../schema/component.schema.json
# ModSecurity (libmodsecurity v3): SecLang WAF engine embedded in a web server. The
# Reference Manual gives SecRuleEngine a default of Off, and the OWASP Core Rule Set is
# distributed separately and pulled in with Include, so no rules are active out of the box.
schemaVersion: "1"
type: "component"
id: "modsecurity"
kind: "waf"
provider: "default"
docs: "https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-%28v3.x%29"
defaults:
  mode: "off"
  managed: false
  botProtection: false
  rateLimiting: false
properties:
  ruleEngine:
    type: "enum"
    values: ["off", "detection-only", "on"]
    default: "off"
  connector:
    type: "enum"
    values: ["nginx", "apache", "iis"]
    default: "nginx"
  coreRuleSetInstalled:
    type: "boolean"
    default: false
  auditLog:
    type: "boolean"
    default: false
```

Human page: https://localhost:3000/catalogue/components/modsecurity
