# urbestack-modsec-disabled-rule-add

First published 19 Nov 2026 (release 0.2.30) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-modsec-disabled-rule-add --rules NUMBER[,NUMBER...] [--domain DOMAIN] [--as owner|administrator]
```

## Description

Turns off ModSecurity detection rules for one domain or for the whole server. Give --rules a comma-separated list of up to 200 rule numbers. Select detection rules that recognize attacks and add to a request's score. Exclude rules that total scores or block requests based on them, size limits, and custom rules.

Use --domain to apply the change to one domain. Omit it to apply the change server-wide as an administrator. Use --as owner to let the domain's owner turn off up to 20 rules for that domain and re-enable them later. Only rules turned off by the owner count toward that limit. The default, --as administrator, has no per-domain limit. If an administrator turns off a rule the owner already turned off, only an administrator can re-enable it.

When UrbeStack manages ModSecurity, it rewrites its Apache configuration for the change, tests Apache's configuration, and reloads Apache. If Apache rejects the configuration, UrbeStack restores the previous configuration and discards the change. The command returns the rules that are off at the selected scope, as urbestack-modsec-disabled-rules does.

## Same in the API

- [POST /domains/{name}/modsec/disabled-rules](https://urbestack.com/docs/api/post-domains-name-modsec-disabled-rules.md): Disable ModSecurity detection rules for a domain
- [POST /security/modsec/disabled-rules](https://urbestack.com/docs/api/post-security-modsec-disabled-rules.md): Disable ModSecurity detection rules server-wide

## Command family: modsec

- [urbestack-modsec-disabled-rule-del](https://urbestack.com/docs/commands/urbestack-modsec-disabled-rule-del.md): Removes the setting that turns off a ModSecurity rule for one domain or for the whole server.
- [urbestack-modsec-disabled-rules](https://urbestack.com/docs/commands/urbestack-modsec-disabled-rules.md): Lists the ModSecurity rule set's detection rules that are turned off.
- [urbestack-modsec-domains](https://urbestack.com/docs/commands/urbestack-modsec-domains.md): Lists domains with their effective ModSecurity mode, the mode set for each domain and who set it and when, and its owner's choice.
- [urbestack-modsec-install](https://urbestack.com/docs/commands/urbestack-modsec-install.md): Installs the distribution's ModSecurity package.
- [urbestack-modsec-requests](https://urbestack.com/docs/commands/urbestack-modsec-requests.md): Lists requests ModSecurity blocked or would have blocked in logging mode, newest first.
- [urbestack-modsec-rule-add](https://urbestack.com/docs/commands/urbestack-modsec-rule-add.md): Adds a server-wide custom ModSecurity rule from standard input.
- [urbestack-modsec-rule-del](https://urbestack.com/docs/commands/urbestack-modsec-rule-del.md): Deletes a custom ModSecurity rule.
- [urbestack-modsec-rule-set](https://urbestack.com/docs/commands/urbestack-modsec-rule-set.md): Changes the custom ModSecurity rule selected by --rule.
- [urbestack-modsec-rules](https://urbestack.com/docs/commands/urbestack-modsec-rules.md): Lists the custom ModSecurity rules shown in the ModSecurity section of the web interface, in rule number order.
- [urbestack-modsec-set](https://urbestack.com/docs/commands/urbestack-modsec-set.md): Sets the server's ModSecurity mode, changes who manages ModSecurity, or does both.
- [urbestack-modsec-sort](https://urbestack.com/docs/commands/urbestack-modsec-sort.md): Sorts ModSecurity audit records into domain logs.
- [urbestack-modsec-status](https://urbestack.com/docs/commands/urbestack-modsec-status.md): Reports whether UrbeStack manages ModSecurity, the configured server mode, and whether the module is installed and loaded by Apache.
