Wazuh can compare the events it collects against external reputation data. An ordinary failed-login record then becomes a prioritized alert as soon as the source is known attack infrastructure. This guide covers turning the IP-DB.com feed into a CDB list, writing the match rule, enriching alerts, and optionally blocking with active response.
1. Convert the feed to CDB format
CDB lists are key-value lines; for IP matching, a trailing colon on each line is all you need. A small script on the manager:
An hourly cron entry is plenty — the pool refreshes every 30 minutes, so pulling more often returns nothing new:
2. Register the list in the ruleset
Add it to the ruleset block in /var/ossec/etc/ossec.conf:
3. Write the match rule
In /var/ossec/etc/rules/local_rules.xml, add a rule that escalates events whose source address is on the list. The address_match_key lookup evaluates CIDR entries correctly too:
Narrowing the rule with if_group (or if_sid) matters. Left as the only condition, the list makes the rule run against every event — unnecessary load in busy environments.
4. Test the rule
After restarting the manager you can test a real log line directly:
The output should show your rule ID and the raised level. If the rule doesn't fire, check first whether the list compiled (the wazuh-makelists output) and who owns the file.
5. Blocking with active response
To drop the matched address temporarily in the agent's firewall:
The timeout is essential: after a false positive the block lifts by itself. Also put your management network, monitoring servers, and VPN egress into the white_list entries.
6. Feed your findings back
You can report the brute-force alerts Wazuh produces to IP-DB.com and improve the pool's quality. The ready-made integration script is on the integrations page; the POST /api/v1/report endpoint expects ip, categories, and an optional comment. Valid categories include brute_force, ssh_abuse, port_scan, web_attack, vuln_scan, and credential_stuffing.
Frequently asked questions
What is the difference between a CDB list and active response?
A CDB list only matches: if an event's address appears on the list, it raises the alert level. Active response actually blocks the address by running a command on the agent. Using both is healthiest: get visibility from the match first, then add blocking as a separate, deliberate decision.
How often should the list refresh?
The pool is rebuilt every 30 minutes, so an hourly cron job is more than enough. Remember to recompile the list and reload the manager after each download, or the rules keep using the old copy.
Do large lists slow the manager down?
CDB lists are compiled to a binary format, so lookup cost stays essentially flat as the list grows. The real cost is which events the rule is evaluated against: a rule with the list as its only condition runs on every event. Narrowing it with if_sid or if_group cuts the load noticeably.
What if active response blocks my own addresses?
That is what the white_list blocks in ossec.conf are for — put your management network, monitoring servers, and VPN egress in them. Also run active response with a timeout; a permanent block means manual cleanup after a false positive.
The firewall equivalents are in our FortiGate and Palo Alto EDL guides, and the scoring logic in the reputation score post.
Comments 0
Share a question, your experience or a correction. You can comment as a registered user or anonymously.
No comments yet. Be the first.