Skip to content

Commit 8db5f76

Browse files
authored
Merge pull request #87 from vimusov/disabled_rules
DEF-30246: Centralized Rules Management
2 parents 4f90155 + 8d9498d commit 8db5f76

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

docs/config_file_description/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,8 @@ to request Anti-bot Challenge again</td></tr>
320320
<td width="250px;"><span class="notranslate">user_override_malware_actions: False</span></td><td># <span class="notranslate">"True"</span> allows overriding of actions applied to malware by a regular user. E.g., users will be able to disable automatic cleanup for their own files even if it was enabled by the admin.</td></tr>
321321
<tr>
322322
<td width="250px;"><span class="notranslate">user_override_proactive_defense: False</span></td><td># <span class="notranslate">"True"</span> allows overriding of Proactive Defense work mode by a regular user. E.g., users will be able to switch Proactive Defense mode to <span class="notranslate">LOG</span> for their websites even if the admin has set it to <span class="notranslate">KILL</span>.</td></tr>
323+
<tr>
324+
<td width="250px;"><span class="notranslate">allow_local_rules_management: True</span></td><td># enable (<span class="notranslate">True</span> - the default value) or disable (<span class="notranslate">False</span>) managing the <a href="/dashboard/#disabled-rules">Disabled Rules</a> in the Imunify360 UI.</td></tr>
323325
<tr><th colspan="2" align="left"><span class="notranslate">STOP_MANAGING:</span></th></tr>
324326
<tr><td><span class="notranslate">modsec_directives: False</span></td>
325327
<td># for internal usage, do not edit</td></tr>

docs/dashboard/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,6 +1754,8 @@ You can configure the automatic restore. Please find more details [here](/dashbo
17541754

17551755
### Disabled Rules
17561756

1757+
#### Editing in UI
1758+
17571759
Go to <span class="notranslate">_Settings_</span> page and choose <span class="notranslate">_Disabled rules_</span>. This page allows users to manage disabled rules which have already been added.
17581760

17591761
::: tip Note
@@ -1793,6 +1795,43 @@ To remove the rule from the disabled list click <span class="notranslate">_Enabl
17931795

17941796
![](/images/disabledrulesenablepopup_zoom60.png)
17951797

1798+
:::tip Note
1799+
To prevent managing the rules there's an option [allow_local_rules_management](/config_file_description/).
1800+
:::
1801+
1802+
#### Config file
1803+
1804+
An alternative way to disable rules is to use the config file `/etc/imunify360/rules/disabled-rules`. It's especially usable with provisioning tools like Ansible, Puppet, Chef, etc.
1805+
1806+
:::tip Note
1807+
Please note that all rules in the config file are not visible in the UI above.
1808+
:::
1809+
1810+
The config file contains lines in the following format:
1811+
1812+
`MODULE_ID:RULE_ID:Description`
1813+
1814+
Where:
1815+
1816+
- `MODULE_ID` can have one of the following values:
1817+
1818+
- `modsec` for ModSecurity rules
1819+
- `ossec` for OSSEC rules
1820+
- `cphulk` for cpHulkd rules
1821+
- `lfd` for Login Failuer daemon rules
1822+
1823+
- `RULE_ID` is the rule id for the module and it is mandatory.
1824+
1825+
- `Description` - text string without specialized symbols.
1826+
1827+
Example:
1828+
1829+
```text
1830+
modsec:1010:
1831+
ossec:1008
1832+
modsec:1001:this is why
1833+
```
1834+
17961835
### Features Management
17971836

17981837
**Overview**

0 commit comments

Comments
 (0)