Skip to content

Commit c04b4ca

Browse files
authored
Merge pull request #349 from atomicturtle/docs/issue-333
Add active response troubleshooting FAQ (#333)
2 parents 98dee41 + fde32e6 commit c04b4ca

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

docs/faq/active-response.rst

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.. _faq_active_response:
2+
3+
Active response
4+
===============
5+
6+
Why is active response not running?
7+
-----------------------------------
8+
9+
Active response only runs **after** a matching alert is generated. If no rule fires,
10+
no script executes — for example, a SYN flood may not produce SSH authentication
11+
failure alerts unless you have rules for that traffic.
12+
13+
Checklist:
14+
15+
1. **Execd is running** — on the host where the script should run:
16+
17+
.. code-block:: console
18+
19+
/var/ossec/bin/ossec-control status
20+
21+
``ossec-execd`` must be listed as running.
22+
23+
2. **Rule and binding match** — the alert must meet ``level``, ``rules_id``, or
24+
``rules_group`` in your ``<active-response>`` block. Test with
25+
:ref:`ossec-logtest`.
26+
27+
3. **Location is correct** — ``local`` runs on the agent that generated the event;
28+
``server`` runs on the manager; ``defined-agent`` requires ``agent_id``.
29+
30+
4. **Command is configured** — a ``<command>`` block must define the ``executable``
31+
(script name under ``active-response/bin``) and link to the ``<active-response>``
32+
via ``<command>name</command>``.
33+
34+
5. **Script is executable** — the file must exist in ``/var/ossec/active-response/bin/``
35+
with execute permission for the ``ossec`` user.
36+
37+
6. **Not disabled** — check for ``<disabled>yes</disabled>`` on that binding or
38+
``<disable-active-response>yes</disable-active-response>`` in the agent ``<client>``
39+
section. See :ref:`manual-ar`.
40+
41+
7. **Restart after changes** — restart OSSEC on affected hosts after editing
42+
``ossec.conf``.
43+
44+
How do I test an active-response binding?
45+
-----------------------------------------
46+
47+
Use :ref:`ossec-logtest` with a sample log line that triggers your rule, then
48+
confirm ``ossec.log`` on the execution host shows the active-response command
49+
invoked. For firewall blocks, verify the block script logged success and the IP
50+
appears in the expected deny list or table.
51+
52+
Where are example active-response configurations?
53+
---------------------------------------------------
54+
55+
See :ref:`manual-ar-unix`, :ref:`ossec_config.active-response`, and the bundled
56+
scripts reference at :ref:`manual-ar-scripts`.

0 commit comments

Comments
 (0)