Real-World Context: When Manual Log Grepping Becomes Impossible
Six months ago, our team’s internal server cluster hit the milestone of over 30 microservices. Every day, raw logs pouring in from Nginx, Docker containers, and SSH amounted to dozens of gigabytes. The tipping point arrived on a weekend night when an Eastern European IP range port-scanned and brute-forced SSH relentlessly for four hours straight. The next morning, opening /var/log/auth.log revealed that the file had ballooned to over 250MB with nearly 90,000 failed authentication attempts. Sifting through logs manually long after an incident has occurred is practically suicide.
Our team needed an open-source SIEM/XDR solution that could respond instantly: centralize logs, detect suspicious behavioral patterns, and automatically block offending IPs in real time.
I chose Fedora Server 40 as the host for our monitoring cluster. Fedora features a modern kernel, tight SELinux integration, and packages that closely track upstream developments from the Red Hat ecosystem. After six months in production, Wazuh smoothly handles three key tasks: centralized log aggregation, File Integrity Monitoring (FIM), and CVE scanning. Most valuable of all is Active Response: unfamiliar IPs exceeding the failed password threshold are blocked in less than three seconds.
Installing the Wazuh All-in-One Cluster on Fedora Server
For infrastructures with fewer than 50 agents, the All-in-One architecture is the most cost-effective approach. All three core components reside on a single node:
- Wazuh Indexer: Search and analytics engine for log data (based on OpenSearch).
- Wazuh Server: Includes the Manager for rule analysis and Filebeat for alert shipping.
- Wazuh Dashboard: Web user interface for visualizing security events.
Recommended specs: 4 vCPUs, 8GB RAM, and 60GB NVMe SSD. Wazuh Indexer is fairly memory-intensive. Allocating less than 6GB makes the service prone to crashing due to Out-Of-Memory (OOM) errors.
1. System Preparation and Virtual Memory Optimization
OpenSearch requires disabling swap and increasing virtual memory map counts to avoid performance degradation:
# Update repositories and packages
sudo dnf update -y
# Disable swap immediately and remove from fstab
sudo swapoff -a
sudo sed -i '/swap/d' /etc/fstab
# Increase virtual memory limits for OpenSearch
sudo sysctl -w vm.max_map_count=262144
echo "vm.max_map_count=262144" | sudo tee -a /etc/sysctl.d/wazuh.conf
sudo sysctl -p /etc/sysctl.d/wazuh.conf
# Install installation utilities
sudo dnf install -y curl tar gpg coreutils
2. Running the Automated Installation Script
Instead of generating SSL certificates manually—where SAN (Subject Alternative Name) mistakes are common—the safest approach is to use the official unattended installation script from Wazuh:
# Download the version 4.9 installation script
curl -sO https://packages.wazuh.com/4.9/wazuh-install.sh
chmod +x wazuh-install.sh
# Run the All-in-One cluster installation
sudo ./wazuh-install.sh -a
The deployment takes around 6 to 10 minutes. Once completed, the terminal will display the generated password for the admin account. Save this string into your password manager immediately. The script also creates a wazuh-install-files.tar archive containing all root CAs and internal certificates. You should download this file to your local machine and remove the server copy.
3. Configuring Firewalld on Fedora
By default, Fedora blocks most inbound ports. We need to open four specific service ports for agents and administrators to connect properly:
# 443: Dashboard Web UI
sudo firewall-cmd --permanent --add-port=443/tcp
# 1514: Log collection from Agents (TCP/UDP)
sudo firewall-cmd --permanent --add-port=1514/tcp
# 1515: New Agent enrollment service (Auth Service)
sudo firewall-cmd --permanent --add-port=1515/tcp
# 55000: Wazuh Manager RESTful API
sudo firewall-cmd --permanent --add-port=55000/tcp
# Reload firewall configuration
sudo firewall-cmd --reload
Connecting Agents and Configuring Active Response for Automatic IP Blocking
Now that the server is ready, the next step is enrolling target nodes into the monitoring network and enabling active defense mechanisms.
1. Installing Wazuh Agent on Target Linux Servers
SSH into any application server (such as Rocky Linux or Fedora) and add the Wazuh repository:
# Import GPG key and add repository
sudo rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH
cat << EOF | sudo tee /etc/yum.repos.d/wazuh.repo
[wazuh]
name=Wazuh repository
baseurl=https://packages.wazuh.com/4.x/yum/
gpgcheck=1
gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH
enabled=1
EOF
sudo dnf install -y wazuh-agent
Point the Agent to the management server by updating the IP address in the configuration file:
# Specify the private or public IP of the Wazuh Server
sudo sed -i 's/<address>127.0.0.1<\/address>/<address>192.168.1.100<\/address>/' /var/ossec/etc/ossec.conf
# Reload daemon and enable agent on boot
sudo systemctl daemon-reload
sudo systemctl enable --now wazuh-agent
After about 10 seconds, run sudo systemctl status wazuh-agent and you should see the status as active (running).
2. Configuring Automatic SSH Brute-Force Blocking
By default, Wazuh only logs and generates alerts on the dashboard without intervening on the targeted machine. To enable active defense, open the configuration file on the Wazuh Manager (Fedora Server):
sudo nano /var/ossec/etc/ossec.conf
Add the following XML snippet inside the <ossec_config> block:
<!-- Automatically block brute-force IPs via local firewall -->
<active-response>
<disabled>no</disabled>
<command>firewall-drop</command>
<location>local</location>
<rules_id>5710, 5712, 5716</rules_id>
<timeout>1800</timeout>
</active-response>
Technical breakdown of this block:
command firewall-drop: Invokes the script to manage rules iniptablesorfirewalldon the host.rules_id 5710, 5712, 5716: Triggers on attempts against nonexistent users, consecutive brute-force attempts, or multiple password failures.timeout 1800: Blocks offending IPs for 30 minutes. Once this timeout expires, the rule is automatically removed to account for accidental mistypes by teammates.
Restart the Manager to apply the new configuration:
sudo systemctl restart wazuh-manager
Hands-On Testing and Production Experience
To ensure the system works as designed, don’t just rely on the dashboard—actively simulate an attack against yourself.
1. Simulating Brute-Force to Test Response
Enable a mobile hotspot to acquire an external, non-office IP address. From your personal machine, deliberately fail SSH logins repeatedly against the agent-equipped server:
# Run 6 attempts with an invalid username or wrong password
for i in {1..6}; do ssh fakeadmin@<IP_AGENT> -o ConnectTimeout=3; done
By the fifth attempt, the terminal will hang with a Connection timed out error. Switch back to the Agent machine and inspect the active response execution log:
sudo tail -n 5 /var/ossec/logs/active-responses.log
If you see an entry like firewall-drop.sh add - <YOUR_IP> 5712, the script has successfully instructed iptables to drop the traffic. On the Dashboard under the Security events tab, a bright red Level 10 alert will also appear.
2. Three Vital Lessons After Six Months in Production
- Index Lifecycle Management: With around 15 nodes streaming logs continuously, the indexer consumes roughly 20GB to 40GB per month. Avoid default retention settings, or your disk will fill up within months. Under Indexer Management > Index Policies, set up a policy to purge logs older than 45 days and transition indices to read-only after 14 days.
- Vulnerability Detection Latency: Wazuh pulls CVE feeds from the NVD every 12 to 24 hours. When a package on Fedora is affected by a zero-day vulnerability, the dashboard might not flag it during the first few hours. Enabling automated security patching via
dnf-automaticremains essential. - Scoping FIM (syscheck) Directories: File integrity monitoring is heavily disk I/O intensive. Enable real-time checks only on sensitive directories such as
/etc,/bin, and/usr/bin. Always exclude log directories (/var/log) and application caches, or server CPU usage will easily hit 100%.
Deploying Wazuh on Fedora Server leverages modern hardware features while avoiding costly commercial licenses. Most importantly, it gives you 100% control over your security data without offloading sensitive internal logs to third parties.

