Get your free beta license ↗
CMDCommand · run as root on the server · modsec family

urbestack-modsec-rule-add

First published 19 Nov 20260.2.30Unchanged since publication

Usage

# urbestack-modsec-rule-add [--note TEXT] [--off] < RULE

Description

From the command's --help output
Adds a server-wide custom ModSecurity rule from standard input. Supply SecRule or SecAction
directives in ModSecurity syntax. A chain counts as one rule. Set the id action to a unique rule
number from 1 to 89999.

Use --note to record the rule's purpose. The rule is enabled by default. Use --off to save it
disabled.

UrbeStack tests Apache's configuration with the rule in place before applying it. If the test
fails, UrbeStack discards the rule and returns Apache's error message. A rule that passes the
test can still block every request to every site. The UrbeStack web interface remains reachable.
Run urbestack-modsec-rule-set --rule N --enabled off to disable the rule.

Options

Find other commands that accept these options

Same in the API

This operation runs the command.

More in modsec

13 commands, by what they work onView all commands in this family →
urbestack-modsec-disabled-
urbestack-modsec-disabled-rule-
urbestack-modsec-rule-
Generated from release 0.2.35 (current) · urbestack-modsec-rule-add --help outputThis entry has been unchanged since it was first published in release 0.2.30 on 19 Nov 2026.
urbestack.com/docs/commands/urbestack-modsec-rule-add/