⚡ Network Security — SIEM Lab

← back to lab.maninejad.com
root@wazuh-manager:~$ whoami
> wazuh siem, self-hosted, monitoring a live public host
> tailscale-bridged home lab <-> aws ec2

A self-hosted SIEM built to monitor lab.maninejad.com's production EC2 host in real time. The manager, indexer, and dashboard run on a local VM behind home NAT; a lightweight agent on EC2 ships logs across a private mesh network back to the manager. Below is the architecture, the build process (including the failures), and real detections it has already caught — including unsolicited scanning traffic from the open internet.

Architecture
Kali Linux VirtualBox VM recon / attack nmap / nikto / ssh AWS EC2 lab.maninejad.com nginx · ssh · fastapi ● wazuh agent (001) tailscale: 100.123.129.28 Tailscale WireGuard mesh Wazuh Manager VMware VM (home lab) Indexer (OpenSearch) Manager (rules engine) Dashboard (UI) tailscale: 100.127.134.74
Why this stack

Wazuh over ELK/Security Onion: single-VM footprint, built-in MITRE ATT&CK and compliance mapping (PCI DSS, GDPR, NIST 800-53), and a detection model that closes the loop directly with prior offensive-security lab work.

Tailscale over port-forwarding: the manager sits behind home NAT with no public IP. Rather than forwarding router ports (fragile, exposes the home network), a WireGuard-based mesh gives both machines stable private addresses that reach each other directly — zero-trust networking applied at home-lab scale.

Build Log — the parts that went wrong

VM disk was 20GB, not 50GB

First install attempt failed mid-way through the dashboard package (No space left on device) — the VM's virtual disk had been created at a default 20GB rather than the planned 50GB, and the installer's automatic rollback left the package manager in a broken state.

# resize the LVM volume into newly expanded virtual disk sudo growpart /dev/sda 3 sudo pvresize /dev/sda3 sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

wazuh-manager stuck mid-removal

The rollback left wazuh-manager half-installed — its prerm/postrm maintainer scripts referenced binaries that no longer existed on disk, so every removal attempt failed with exit code 127. Fixed by neutralizing the broken scripts directly and force-purging.

dpkg: error processing package wazuh-manager (--remove): old wazuh-manager package prerm script failed with exit status 127 # fix: overwrite the broken maintainer script with a no-op, then purge clean sudo bash -c 'echo "exit 0" >> /var/lib/dpkg/info/wazuh-manager.prerm' sudo dpkg --purge wazuh-manager

Full stack installed on the second real attempt

With disk space corrected and package state cleaned, the all-in-one installer (indexer + manager + dashboard) completed successfully in ~10 minutes.

Detections

Unsolicited scan against the public site

Within hours of the agent going live, an unknown external host began probing the site for common misconfiguration files — no attack was staged for this one, this is ordinary background internet scanning being caught in real time.

FieldValue
Rule31101 — Web server 400 error code
Requested paths/config.json, /sitemap.xml
Sourceexternal IP, unrelated to lab infrastructure
Rule level5
Compliance mappingPCI DSS 6.5 / 11.4 · GDPR IV_35.7.d · NIST 800-53 SA.11 / SI.4

Invalid-user SSH attempt, from Kali

A deliberate login attempt against a non-existent account, run from the Kali VM, appeared in the agent's shipped auth.log data within seconds of the attempt — confirming the manager → agent → detection pipeline works end-to-end.

Invalid user wronguser from [kali_ip] port 35820 Connection closed by invalid user wronguser [kali_ip] port 35820 [preauth]
Stack
Wazuh 4.9.2 OpenSearch (indexer) Ubuntu Server 26.04 VMware Workstation AWS EC2 Tailscale / WireGuard Nginx Kali Linux MITRE ATT&CK
Next