Wazuh active response: when automated blocking helps and when it hurts
A SOC or platform team that has watched alerts pile up often wants the obvious next step: when a rule fires, the system should contain the threat without waiting for an analyst. Wazuh supports this through active response, where the Wazuh server runs a predefined script on an agent in reply to a matching alert, such as blocking a source IP or disabling a user account. The risk is that a wrong block can lock out administrators, cut off a service that depends on a shared address, or strip access from an account that a scheduled job needs. In practice, the difficulty sits in three places: deciding which rules are allowed to trigger a response, limiting the scope of each action to the hosts and identities it should touch, and making sure every action can be reversed quickly. The command itself is the simplest part of the work.
The self-hosted Wazuh software carries no license fee, so the cost of active response is the engineering time to design, configure and test it, plus the operational time to maintain it after upgrades. Start by inventorying which rules would trigger each response and which accounts, addresses and services they could affect, including management paths, monitoring systems and backup jobs. Then test each response in a non-production environment that mirrors your agent groups and network layout. Confirm the exact configuration keys, script locations, timeout behavior and supported platforms against the Wazuh 4.14 documentation for your installed version, and check the release notes for changes before you upgrade. Any figures you use for timing or capacity should come from that documentation or from your own measurements, not from assumptions carried over from another platform.
Which Wazuh components and settings active response depends on
Active response is not a single feature. It is a chain that starts with a rule firing on the Wazuh server and ends with a command running on an endpoint, and every link in that chain has its own settings and failure modes. The cards below map the parts so the team can decide where each setting lives and where to check it.
Wazuh server holds the trigger logic
The Wazuh server analyzes agent data with decoders and rules, so it is where a rule that fires is evaluated and where the active response block that reacts to it is defined. Because the server runs as a cluster in larger deployments, confirm which node evaluates events and which node holds the active response configuration before you rely on a single trigger path.
Wazuh componentsCentral configuration delivers response settings
The server manages agent configuration remotely, so active response settings are normally pushed from the server through agent groups rather than edited by hand on each host. Using central configuration keeps every endpoint in a group aligned and gives one change history. Confirm the exact configuration keys against the Wazuh 4.14 documentation before you write them.
Agents execute the response on endpoints
The agent on each endpoint runs the response command when the server instructs it, so the agent's operating system, permissions and version determine what a response can actually do. A block that works on a Linux host may not have an equivalent on a Windows or macOS host. Test each platform in your fleet separately.
Built-in and custom response commands
Wazuh ships with built-in response commands, and you can define custom commands that run scripts you control, such as a script that disables an account in your directory. Each command is a definition the agent must have available, so confirm the command names, script locations and argument handling in the 4.14 documentation. Keep custom scripts under version control and review them like production code.
Dashboard and indexer record the outcome
The alert that triggered a response and the record of the response are stored in the Wazuh indexer and displayed in the Wazuh dashboard. Your incident responders and auditors will use these records to reconstruct what happened, so check that the response events are indexed and searchable in your environment, and that retention settings keep them long enough for your review cycle.
Wazuh componentsRule levels and access to change them
Which rules trigger a response, and at what alert level, is a setting that determines how much automation you accept. Restrict who can edit rules, response definitions and agent group membership, because a change to any of these can alter what runs on production hosts. Record a named owner for each trigger.
Which response actions and trigger strategies to allow
This table compares the main response actions and trigger scopes for Wazuh active response, with the situations each suits and the operational cost of each. Read each row as a decision: the cheaper and more reversible the action, the wider you can usually afford to let it run.
| Option | When it fits | Operational cost and risk |
|---|---|---|
| Block an IP on the agent | A single hostile source repeatedly hitting an internet-facing service, such as repeated failed logins from one address (illustrative) | Risk of blocking a shared NAT address, a monitoring host or your own admin path. Needs an allowlist of internal and management ranges and a reversal action with a timeout. |
| Disable a directory account | Credential abuse on one identity, such as many failed logins followed by a success from an unusual host | High impact on users and service accounts. Lockout hits real staff and automation. Restrict to human accounts, exclude service accounts and confirm how re-enablement is handled. |
| Run a custom script | Containment steps that need local logic, such as stopping a process or quarantining a file after a known signature fires | Scripts run with agent privileges and are only as safe as their logic. Each script needs testing on non-production hosts, versioning and an owner for changes after upgrades. |
| Alert only, no automatic action | New or noisy rules, early tuning phases, or any detection where a wrong response would cause more harm than the attack | No containment, so analysts carry the response time. Low disruption risk and easy to reverse. Often the right default for new rules until false positives are measured. |
| Trigger on a single rule ID | A well-understood, high-confidence rule whose false-positive history you have reviewed | Narrow and predictable, and easy to audit. Needs updating when rules are renumbered or custom rules change, so keep a record of which IDs are wired to responses. |
| Trigger on rule level or rule group | Broad coverage across a family of related detections, such as all authentication failure rules above a chosen level | Wider blast radius. A new or misconfigured rule in the group can start actions without review. Pair with a higher threshold, a minimum repeat count and a test run first. |
| Timeout and automatic reversal | Blocks or disables that should lift after a fixed window if the alert was a false positive | Reduces lasting damage from wrong triggers but can release a real attacker early. Confirm the timeout with the team that owns the affected systems. |
How to build Wazuh active response in a safe sequence
This sequence turns Wazuh active response from an idea into an enforced countermeasure by starting with rule selection and an allowlist, then proving each response in alert-only mode and on a canary group before wider rollout.
Inventory candidate rules and false-positive history
The security engineer lists every rule that could trigger a response, such as repeated authentication failures or known-bad file changes, and pulls its alert history for the past several weeks. Rules with frequent benign matches, such as scheduled jobs that fail logins, are either tuned or excluded. The step is done when each candidate rule has a written note on its false-positive rate and an owner who accepts responsibility for it. Ask the team to confirm that this review covers the full alert window they plan to rely on.
Define the allowlist of protected addresses
The platform owner and the network team write an allowlist of addresses and accounts that must never be blocked or disabled. It should include administrator workstations, the Wazuh server and indexer addresses, monitoring and vulnerability scanner hosts, load balancers, and service accounts that critical applications depend on. The allowlist is applied in the response configuration and in the account-disabling logic. Check it by confirming that each listed address and account appears in the file and that a test event from an allowlisted host produces no block.
Create the response command and scope it
The engineer defines the active response command in the Wazuh server configuration, specifying the script that runs on the agent, such as one that adds a firewall drop rule or locks an account. The command is bound to a test agent group only, not to all agents. Confirm the script and its parameters by reviewing the file on the test host and running it manually with a harmless input. The step is done when the command is deployed to the test group and the server reports it as active for that group only.
Configure the trigger with a narrow timeout
The engineer links the chosen rule to the response command and sets a short block duration, so any mistaken action expires without manual cleanup. Permanent blocks are avoided until the response has a long record of correct behavior. The timeout value should be taken from the team's own risk decision, not a default. The check is that a test event from a non-allowlisted test host triggers the rule and that the server log shows the response entry with the configured timeout.
Run in alert-only mode first
Before any enforcement, the team runs the rule and response in a mode that records the intended action without executing it, or runs the response while the team watches the output with the command disabled on agents. Analysts compare each logged intended action against what they would have done manually for at least one full review cycle. The step closes when the team has reviewed every intended action from the test window and found no action that would have hit an allowlisted or production address. Ask the vendor or your own test notes to confirm how alert-only behavior is achieved in your version.
Enforce on a canary group
The team enables the response on a small canary group of non-critical agents, chosen because a mistaken block would have limited impact. The engineer triggers a controlled test from an approved source and confirms the block is visible on the canary agent, for example as a firewall rule or a disabled account state, and that the administrator can still reach the host. The step is done when the block and its removal after timeout are both observed, and the allowlist prevents self-lockout from the administrator workstation.
Expand scope and review regularly
After the canary period is clean, the team adds further agent groups in stages, with each stage requiring the same checks as the canary. Each new group is reviewed against its own allowlist, because production servers often carry different service addresses. The team sets a recurring review of response logs and false-positive counts, and the step is complete when the expanded group list, allowlist owners and review schedule are documented and the response log shows only expected actions.
How a rule firing reaches an endpoint as an action
The path starts when a Wazuh agent on an endpoint collects an event and sends it to the Wazuh server, which decodes it and matches a rule. A rule that triggers active response passes through an allowlist and scope check on the server before the command is sent to agents in the targeted group. The agent runs the command locally, returns the result across the trust boundary, and the server records it as an alert in the indexer, where the dashboard shows it. Check the scope and allowlist gate first, because it decides which hosts can ever receive an action.
Path from an agent event to a response action and its recorded result.
What drives Wazuh active response effort and cost
This table lists the drivers that change how much work an active response rollout takes and how to keep each one small at the start. Read it as a checklist for scoping a quote: the drivers that multiply effort are rule count, endpoint variety and environment count. The main takeaway is that a narrow first scope, one rule set on one agent group, keeps effort contained and gives evidence before wider rollout.
| Driver | Why it changes effort or cost | How to keep it down |
|---|---|---|
| Rules considered for automation | Each rule that triggers a countermeasure needs its own trigger logic, testing and rollback. Rules with high false-positive rates multiply tuning and incident follow-up. | Start with a handful of high-confidence rules, measure their false positives in alert-only mode, and add rules one at a time. |
| Endpoint types and operating systems | Each operating system needs its own response script and command syntax, so Linux, Windows and macOS each add build and test work. | Begin with one operating system or one agent group, then add platforms once the first scripts are proven. |
| Administrator and service allowlists | Allowlists must list admin hosts, monitoring servers, load balancers and service accounts. Large or frequently changing lists raise review work and the risk of blocking legitimate traffic. | Agree the allowlist with system owners before build, keep it in version-controlled configuration, and review changes on a set schedule. |
| Firewall or identity system integration | Blocking at a firewall or disabling accounts in an identity provider adds API credentials, change control on the target system and a second place to test and roll back. | Use host-level responses first. Add firewall or identity integrations only after the owners of those systems approve the scope in writing. |
| Number of environments needing separate tests | Development, staging and production often differ in IP ranges, directory structure and agent versions, so each environment needs its own test pass. | Test the full response chain in one non-production environment, then confirm only environment-specific values before production. |
| Approval and change process | Your change board, security sign-off and any required evidence of testing set how many review cycles each rule and script goes through. | Confirm the approval path before scoping. Bundle related rules into one change request and keep a written rollback plan with each. |
| Ongoing tuning and monitoring | Active responses need periodic review as the environment, rules and Wazuh release line change. This work recurs after go-live. | Ask for the review frequency in the quote and assign an owner for alert outcomes and allowlist maintenance. |
How active response differs on single node, cluster and air-gapped deployments
A single-node Wazuh server keeps the change path short. Active response settings live in one server's configuration, and there is one place to edit custom rules, active response definitions and the scripts they call. That simplicity is useful, but it also means a mistake reaches every agent at once, because no other node is holding a previous working state. Treat each change as a potential production event and test it before enabling it.
- Single change point: Edits to the server configuration and active response definitions take effect on one host, which makes review and rollback straightforward.
- Test on a non-production agent first: Enable the response on a small group of test endpoints, using a harmless trigger, before applying it to production agent groups.
- Protect against self-lockout: A block rule that matches an administrator's address, a monitoring host or a jump server can cut off the access you need to reverse it.
- Keep a rollback path: Record the previous configuration and confirm you can disable the response without needing the server to be healthy.
- Watch the server load: Confirm the single server still handles alert volume and active response execution during peak activity.
Before enabling anything on a single node, confirm which agents will run the response, which trigger rules fire it, and how you will undo it from the server.
In a clustered Wazuh server, the same active response definition must behave the same way on every node. Configuration drift between nodes can produce responses that fire on one node and not another, which makes incidents hard to reconstruct. The bigger question is delivery: the response is executed by the agent, so the agent must still be reachable through whichever node it is connected to when the rule fires. Agent connections are distributed across the cluster, so confirm how agents reconnect after a node failure.
- Consistent configuration: Keep active response settings, custom rules and scripts identical across all server nodes, and manage them through one controlled process.
- Agent connection path: Confirm the agent can receive the command after a load-balanced or failed-over connection moves to another node.
- Node failure during an event: Decide what happens if the node that detected the trigger goes down before the response is delivered.
- Script presence on agents: Scripts used by active response must exist on every agent that could run them, regardless of which server node issued the command.
- Ownership of changes: Assign one team to change active response behavior so cluster nodes do not receive different versions.
Confirm with the Wazuh documentation for your version how cluster nodes distribute active response commands and how agents recover their connections.
In an air-gapped or offline installation, active response depends on resources that exist inside the network. Any external target a response uses, such as a firewall, directory service or ticketing system, must be reachable from the Wazuh environment without internet access. Any threat intelligence used to justify a block must also be held locally. Without local data, the rule that decides to block may have no basis, and the block may be based on stale or missing information.
- Internal blocking targets: Confirm that the firewall, directory or endpoint control that enforces the response is inside the isolated network and reachable from the agents or server that execute it.
- Local threat intelligence: Vulnerability and threat data used to support decisions should come from an offline repository or local feed that you maintain, rather than from an online service.
- Update process for offline data: Define how offline content is refreshed, tested and imported, and who approves it, since updates arrive by a manual route.
- No external callbacks: Scripts or integrations that call outside services will fail silently or stall, so remove or replace them.
- Documented fallbacks: Decide which responses remain manual when an internal target is unavailable.
For the offline setup, check the Wazuh offline installation guide and confirm with the vendor documentation for your version which features need internet access.
How to protect the response path from abuse and self-harm
An active response can block traffic or disable accounts on its own, so a misconfigured or hijacked response path can cause the outage it was meant to prevent. The five controls below work together: they limit who can change responses, prove that scripts on endpoints are the ones you approved, keep external credentials contained, keep the allowlist current, and leave a record of every action.
Restrict who can edit responses
Active response is defined in the server configuration and its scripts are deployed through the manager, so anyone who can change either can change what runs on endpoints. Limit edit rights to a small named group using role-based access in the dashboard and file permissions on the server. Confirm that read-only analysts cannot alter response settings, and review that group whenever staff change roles. Treat every edit as a change to production controls.
Single sign-on docsVerify integrity of response scripts
A script that runs on an endpoint runs with the agent's privileges, so a replaced script is a direct path to code execution. Keep a checksum of each approved script in version control and compare what is deployed on agents against it on a schedule. Check how your Wazuh version handles script distribution and confirm the verification steps before relying on them for enforcement.
Keep firewall and directory credentials in a secrets store
Responses that block IPs or disable accounts often need credentials for a firewall, identity provider or directory service. Store those credentials in a secrets manager, not in scripts or configuration files on endpoints. Create a dedicated service account that can only block addresses or disable the specific accounts in scope, and rotate it on a fixed schedule.
Review the allowlist after every change
Allowlists stop responses from blocking your own administrators, monitoring hosts, backup networks and CI runners. Each time a new service, VPN range or admin workstation is added, check whether it needs an entry before the next response can fire against it. Test the allowlist against a list of critical addresses and accounts, and record who approved each change.
Log every enforced action
Every block, unblock or account change made by a response should leave a record that shows which rule fired, the target, the script version and the time. Confirm that these events reach the indexer and are retained for as long as your audit policy requires. Review the log regularly so that responses which fire unexpectedly are caught early and can be rolled back.
How to prove Wazuh active response works and fails safely
Proving that Wazuh active response works means testing it before it touches production, and the test plan should cover both the happy path and the ways the automation can misfire. Start in a lab or on a canary agent that is not business-critical. Pick a known test rule, or a custom rule written only for testing, and fire it with a harmless trigger such as a controlled failed login. Then confirm four things: the action script runs on the endpoint, the blocked address or disabled account changes state as expected, the block is removed when its timeout expires, and the alert trail in the Wazuh dashboard shows the trigger, the action and the outcome. Record the rule ID, the agent name, the timestamps and the command output for each run, because the same evidence serves the change record later.
The allowlist test is the one most likely to prevent an outage. Add a test address and a management subnet to the allowlist, then trigger the rule from each of them. The active response must not block them, and the test should show that the allowlist is read by the response you configured, not just present in a file. Repeat the check for the administrator's own workstation and the jump host, since a rule can fire from a legitimate admin session during an incident. Then run the failure tests: stop the Wazuh server or cut the agent's connection and confirm the agent does not hang or apply stale actions; make the response script exit with an error and confirm the failure appears in the logs; and trigger a rule that fires repeatedly to check that the response does not keep stacking blocks or disabling accounts. Ask your team to confirm how these behaviors appear in the version you run, using the release notes and documentation for your 4.14 patch level.
Questions teams ask before building Wazuh active response
Can our team build Wazuh active response ourselves?
Yes, if you have engineers who already run Wazuh and can write and test rules. Active response is configured through the Wazuh server, using ossec.conf for the active-response blocks and command definitions that run on agents. The harder part is not the configuration syntax but deciding which rules are safe to act on, which hosts may be touched, and how each action is tested and rolled back. Teams without a Wazuh owner, a test environment that resembles production, or a change process for security controls usually find that the build takes longer than the configuration suggests. Confirm your in-house skills against the scope below before deciding.
What drives the cost and effort of an active response build?
The main drivers are the number of response actions, the number of rules that trigger them, the variety of endpoints (Linux, Windows, macOS and others are all supported by Wazuh agents), and how many systems need an approval path. Each action needs a script or built-in command, a test case, and a rollback procedure. Costs fall into staff time for design, testing and change approval, the test environment itself, and ongoing review of rules as they change. The Wazuh software is open source under the GNU General Public License version 2 with no license fee, so the cost is labor and infrastructure. Ask any provider for a quote that lists each action, the test plan and the rollback steps as separate line items.
What do we need to provide before active response work starts?
Plan on providing four inputs: named rule owners who can approve which alerts may trigger an action, an allowlist of systems and accounts that must never be blocked or disabled (domain controllers, backup servers, break-glass accounts, monitoring hosts, and your own administrators' addresses), written change approval rules for security controls, and a non-production environment with agents enrolled so actions can be tested safely. Without the allowlist and the rule owners, the design cannot be finished. Confirm with your change board how emergency changes to automated responses are handled before the work begins.
Is automated blocking safe to turn on in production?
It can be, but only after the action has been tested against real alert patterns and reviewed by people who own the affected systems. Start with alert-only mode, review what would have been blocked for a period you agree with your operations team, and then enable actions for a narrow set of high-confidence rules. Blocking an IP address on an internet-facing host, or disabling a service account used by a batch job, can cause outages that look like security incidents. Build the allowlist first, scope actions to specific agent groups, and make sure every action writes to the audit trail so it can be explained later.
How do we undo an automated action?
Wazuh active response supports a timeout for some commands, so a block can expire on its own, but you should not rely on timeouts alone. Document a manual unblock path for each action: the exact command or script that reverses a firewall block, re-enables an account, or releases a quarantined file. Test the reversal on a non-production host before go-live, and confirm who may run it at 2 a.m. Record every action and reversal so incident responders can see what changed. Confirm the exact reversal behavior for each command in your Wazuh version and in your own environment before you depend on it.
How do upgrades and custom rules affect active response?
Active response depends on rule IDs, decoded fields and command definitions, so an upgrade or a changed custom rule can silently stop an action from firing or make it fire on the wrong events. Keep custom rules and active response configuration in version control, record the rule IDs each action depends on, and rerun your test cases after every upgrade across the indexer, server, dashboard and agents. Wazuh releases patches on the 4.14 line on a regular basis, so plan a repeatable test pass rather than a one-off check. Confirm the upgrade order and any changes to command definitions in the release notes before each upgrade.
Does active response help with compliance evidence?
It can help. Logged actions, approval records and test results can show that a control operated as designed, which is useful when assessors ask how an incident was contained. However, DeployOpen prepares systems, controls and evidence for compliance assessments but does not issue audit reports or certifications. Ask your assessor which records they expect, such as the rule definition, the approval, the execution log and the reversal, and confirm that your Wazuh audit logging retains them for the period your policy requires.
What to monitor, back up and document after go-live
Once active response is live, the first thing to monitor is what it actually does. Track the count and rate of enforced actions, such as blocked IPs or disabled accounts, and alert on sudden spikes. A spike can mean a real attack, but it can also mean a noisy rule has started firing on normal traffic, a misconfigured agent group is applying a response too broadly, or a scheduled job is tripping a login-failure rule. Review the active response log entries alongside the alerts that triggered them, and record each false positive with the rule ID, the affected host or account, and the fix you made. Make this review a recurring task, with a named owner, rather than something done only after an incident.
Treat the response configuration and scripts as part of the Wazuh configuration you back up. The ossec.conf settings for active response, the rule definitions that reference them, the custom scripts and the agent group files should live in the same version-controlled repository and backup set as the rest of the deployment, so a restore brings back the countermeasures along with everything else. Retest every response after each 4.14 patch release, because upgrades can change how responses behave even when your configuration is unchanged. Check the Wazuh release notes before each upgrade and confirm whether any change touches active response, scripts or agent behavior.
Document three things in writing before you rely on the automation. First, name an owner for each allowlist entry, along with the reason it exists and when it was last reviewed. Second, define the escalation path: who is paged when a response fires against a production system, who can approve an exception, and who can switch a response off. Third, write the rollback steps for each response, including how to remove a blocked IP, re-enable an account and restore a changed file, and who is authorized to run them. Test these steps during a planned exercise, not during an incident. The documentation should be specific enough that an on-call engineer who did not build the setup can follow it at 2 a.m.
How DeployOpen scopes, builds and hands over Wazuh active response
DeployOpen approaches Wazuh active response as a fixed-scope engagement inside your own infrastructure, starting from the rules you need to act on and the systems that must never be disrupted. Each automated countermeasure is designed, tested in a controlled environment, documented and handed over with its safeguards and rollback steps.
How we scope
- Inventory which Wazuh rules should trigger responses and which should only alert for analyst review.
- Identify production hosts, service accounts and IP ranges that must be excluded from automated blocking.
- Agree the written scope, deliverables and timeline before any active response configuration begins.
How we build
- Configure active response commands on the Wazuh server and agents, with each action tied to a specific rule and agent group.
- Test every countermeasure against simulated alerts in a non-production environment before enabling it on live endpoints.
- Add allowlists, time-limited blocks and clear reversal commands so a false positive can be undone quickly.
How we hand over
- Document each active response rule, the action it takes, the affected agents and the safeguards applied.
- Provide runbooks for unblocking an IP, re-enabling an account and disabling automation during an incident.
- Walk your security operations and platform teams through the configuration, test results and retest evidence.
How we support
- Offer ongoing support and upgrades for the active response setup as a retainer after go-live.
- Retest active response logic after Wazuh upgrades or changes to custom rules and decoders.
- Confirm with your team which support terms, response windows and testing frequency apply before signing.

