SysWarden is a tool based on the Data-Shield IPv4 Blocklists Community, Wazuh and Fail2ban that blocks up to 99% of noisy, disruptive, and malicious IP addresses and focuses on real signals.
SysWarden acts as an advanced, preemptive shield for your infrastructure. By dropping known malicious traffic at the firewall (kernel) level before it even reaches your applications, it provides a crucial extra layer of security for any exposed asset.
-
It is highly recommended for securing:
- Public VPS & Dedicated Servers: Protect your SSH ports, control panels, and core system services from relentless brute-force attacks and automated mass-scanning.
- Websites & CMS (WordPress, Magento, etc.): Block bad bots, vulnerability scanners, and exploit attempts targeting your web servers (Nginx/Apache) before they consume your CPU and RAM.
- Public APIs & SaaS Platforms: Keep your application resources dedicated to legitimate users. Prevent endpoint abuse, scrapers, and Layer 7 DDoS probes.
- Critical Infrastructure: Add a robust perimeter defense for your business-critical applications and internal tools exposed to the internet.
- Databases (MySQL, MongoDB, PostgreSQL): Shield your exposed or partially exposed data stores from credential stuffing, unauthorized access attempts, and ransomware gangs.
By eliminating the "background noise" of the internet, SysWarden ensures your servers remain fast, clean, and focused on serving real humans.
๐ ๏ธ SysWarden (Technology Stack)
โโโ ๐ Core Orchestration
โ โโโ ๐ Bash Scripting # Automation, Installation & Logic
โ โโโ ๐ง Linux Kernel # OS Support (Debian/Ubuntu & RHEL/Alma)
โ
โโโ ๐งฑ Firewall Backend (Auto-Detection)
โ โโโ ๐ก๏ธ Nftables # Modern Packet Filtering (Debian 10+)
โ โโโ ๐ฅ Firewalld # Dynamic Zone Management (RHEL 8/9)
โ โโโ โก IPSet + Iptables # High-Performance Hashing (Legacy)
โ
โโโ ๐ฎ Active Defense & Logs
โ โโโ ๐ Python 3 # Log Parsing & API Connector
โ โโโ ๐ซ Fail2ban # Intrusion Prevention System (Jails)
โ โโโ ๐ Systemd / Journalctl # Service Management & Logging
โ โโโ โป๏ธ Logrotate # Log Maintenance & Compression
โ
โโโ โ๏ธ External Integrations
โโโ ๐ฆ Data-Shield Repo # Threat Intelligence Source (Git)
โโโ ๐ก AbuseIPDB API # Community Reporting (Outbound)
โโโ ๐ฆ Wazuh XDR Agent # SIEM & Vulnerability Detection
-
Universal OS Support: Auto-detects and adapts to Debian, Ubuntu, CentOS Stream, Fedora, AlmaLinux, and Rocky Linux.
-
Intelligent Backend Detection: Automatically selects the best firewall technology present on your system:
- Firewalld (CentOS Stream/Fedora/Alma/Rocky native integration)
- Nftables (Modern Debian/Ubuntu standard)
- IPSet/Iptables (Legacy support)
-
Smart Mirror Selection: Replaced ICMP Pings with TCP/HTTP latency checks to bypass firewall restrictions on GitHub/GitLab, ensuring you always download from the fastest mirror.
-
Kernel-Safe Optimization:
- Enables high-performance memory hashing (
hashsize) on Debian/Ubuntu. - Uses conservative, stability-first settings on RHEL/Rocky kernels to prevent "Invalid Argument" crashes.
- Enables high-performance memory hashing (
-
Persistence Guaranteed: Rules are written to disk (XML for Firewalld, persistent saves for Netfilter), surviving reboots instantly.
-
Auto-Update: Installs a cron job to refresh the blocklist hourly.
- Noise Reduction: Drastically reduce the size of system logs (
/var/log/auth.log,journalctl) by blocking scanners at the door. - Resource Saving: Save CPU cycles and bandwidth by dropping packets at the kernel level rather than letting application servers (Nginx, SSHD) handle them.
- Proactive Security: Move from a "Reactive" stance (wait for 5 failed logins -> Ban) to a "Proactive" stance (Ban the IP because it attacked a server in another country 10 minutes ago).
Many admins worry that installing a massive blocklist might conflict with Fail2ban. SysWarden solves this via layering.
๐ก / (Network Traffic Flow)
โโโ ๐ก๏ธ Layer 1: Firewall Shield (Static Defense)
โ โโโ ๐งฑ Engine: Nftables / Firewalld / Ipset (Auto-detected)
โ โโโ ๐ Blocklist: ~95k - 100k IPs (Data-Shield Source)
โ โโโ ๐ซ Action: DROP packet before reaching services
โ
โโโ ๐ฅ๏ธ Layer 2: User Space (Allowed Traffic)
โโโ ๐ Services & Logs
โ โโโ ๐ SSH / Web / Database (Custom Ports Allowed)
โ โโโ ๐ System Logs: /var/log/syslog & journalctl
โ โโโ โป๏ธ Maintenance: Logrotate (Daily cleanup, 7-day retention)
โ
โโโ ๐ Layer 3: Active Response (Dynamic Defense)
โโโ ๐ฎ Fail2ban Service
โ โโโ ๐ Watch: Brute-force patterns (SSH, Nginx, etc.)
โ โโโ โก Action: Ban Dynamic IP locally
โ
โโโ ๐ SysWarden Reporter
โ โโโ ๐ Watch: Firewall Drops & Fail2ban Bans
โ โโโ ๐ก Action: Report to AbuseIPDB API
โ
โโโ ๐ฆ Wazuh Agent
โโโ ๐ Watch: File Integrity & System Events
โโโ ๐จ Action: Forward alerts to Wazuh SIEM
- Data-Shield (Layer 1): Creates a high-performance Nftables
setcontaining ~100k IPs. This acts as a static shield, dropping known bad actors instantly using extremely efficient kernel-level lookups. - Fail2ban (Layer 2): Continues to monitor logs for new, unknown attackers.
- Result: Fail2ban uses less CPU because Data-Shield filters out the "background noise" (99% of automated scans) before Fail2ban even has to parse a log line.
On Enterprise Linux, proper integration with firewalld is critical.
- Native Sets: SysWarden creates a permanent
ipsettype within Firewalld's configuration logic. - Rich Rules: It applies a "Rich Rule" that drops traffic from this set before it reaches your zones or services.
- Persistence: Unlike simple scripts that run
ipsetcommands (which vanish on reload), SysWarden writes the configuration to/etc/firewalld/, ensuring the protection persists across service reloads and server reboots.
In a community setting, during the script installation phase, it is possible to report triggered and confirmed alerts to ABUSEIPDB in order to keep the database of malicious IP addresses up to date.
- Enable the option Simply confirm with
ywhen prompted during installation. - API key Paste your AbuseIPDB API key to automatically report malicious IPs and contribute to the community database.
For organizations using a SIEM, SysWarden includes an interactive module to deploy the Wazuh XDR Agent effortlessly, bridging local protection with centralized monitoring.
- Seamless Deployment: The script automatically detects your OS, installs the official GPG keys/repositories, and deploys the latest agent version.
- Smart Configuration: By simply providing your Manager IP, Agent Name, and Group during the prompt, the script injects the configuration immediatelyโno manual editing of
ossec.confrequired. - Auto-Whitelisting: To ensure uninterrupted log forwarding, SysWarden creates a high-priority exception rule allowing traffic to/from your Wazuh Manager (ports 1514/1515) to bypass the strict blocklist.
This script automatically detects installed services (Nginx, Apache, MongoDB) and configures protections accordingly. If a service is installed AFTER SysWarden, simply run the update command or rerun the installer to activate the new jails.
# For Ubuntu/Debian
apt update && apt upgrade -y
apt install wget -y
# For Rocky/AlmaLinux/CentOS Stream/Fedora
dnf update -y
dnf install wget -y
# install script
cd /usr/local/bin/
wget https://github.com/duggytuxy/syswarden/releases/download/v8.00/install-syswarden.sh
chmod +x install-syswarden.sh
./install-syswarden.sh
# Update configurations and Blocklists
./install-syswarden.sh update
# View Alerts
./install-syswarden.sh alerts
# Whitelist an IP
./install-syswarden.sh whitelist
# Block an IP
./install-syswarden.sh blocklist
# Docker protection
./install-syswarden.sh protect-docker
# SysWarden Upgrade Checker
././install-syswarden.sh upgrade๐ / (Root System)
โโโ ๐ etc/
โ โโโ ๐ syswarden.conf # Main Configuration (Auto-generated)
โ โโโ ๐ fail2ban/
โ โ โโโ ๐ jail.local # Custom Jails (SSH, Web, DB) injected by SysWarden
โ โโโ ๐ logrotate.d/
โ โ โโโ ๐ syswarden # Log Rotation Config (7-day retention & compression)
โ โโโ ๐ cron.d/
โ โ โโโ ๐ syswarden-update # Hourly Update Job
โ โโโ ๐ systemd/system/
โ โโโ ๐ syswarden-reporter.service
โโโ ๐ usr/local/bin/
โ โโโ ๐ install-syswarden.sh # Main Script (CLI Tool)
โ โโโ ๐ syswarden_reporter.py # Python Log Analyzer
โโโ ๐ var/
โโโ ๐ log/
โ โโโ ๐ syswarden-install.log # Installation & Debug Logs
โ โโโ ๐ fail2ban.log # Banned IPs logs
โโโ ๐ ossec/etc/
โโโ ๐ ossec.conf # Wazuh Agent Config (Manager IP & Ports injected here)
./install-syswarden.sh uninstallHelp keep the tool alive Developing and maintaining a high-fidelity, real-time blocklist requires significant infrastructure resources and dedicated time. Your contributions are vital to ensure the project remains sustainable, up-to-date, and free for the community. If you find this project useful, consider supporting its ongoing development:
- โ Ko-Fi: https://ko-fi.com/laurentmduggytuxy
| Duggy Tuxy |
|---|
| Verified Contributor |
- SysWarden ยฉ 2026
- Developed by Duggy Tuxy (Laurent Minne).
"This tool is open-source software licensed under the GNU GPLv3 License."