Trust & Security Model
Full transparency on how the Defensia agent works, what it accesses, and what data leaves your server.
How the Agent Works
The Defensia agent is a single Go binary that runs as a service on your server — systemd where available, Upstart or SysVinit otherwise. It reads log files to detect attacks, applies firewall rules to block malicious IPs, and reports security events to your dashboard.
Open Source
Agent source code is MIT licensed and available on GitHub. You can audit every line.
Single Binary
No dependencies, no runtime, no containers. One static binary at /usr/local/bin/defensia-agent.
Lightweight
Typically under 1% CPU and <30MB RAM. No background scanning or heavy processing.
What the Agent Accesses
The agent runs as root because it needs to read auth logs and manage iptables rules. Here is exactly what it touches:
| Resource | Access | Purpose |
|---|---|---|
/var/log/auth.log or /var/log/secure | Read | Detect SSH brute force, failed logins |
| Nginx / Apache access logs | Read | WAF detection (SQLi, XSS, path traversal, etc.) |
iptables | Read + Write | Apply and remove IP bans (dedicated chain DEFENSIA) |
/proc/net/tcp | Read | Port scan detection |
/var/run/docker.sock | Read (optional) | Container discovery (only if Docker is present) |
/etc/defensia/ | Read + Write | Agent config and authentication token |
The agent does not read application databases, user files, environment variables, or any data outside of log files and network state.
What Data Leaves Your Server
The agent communicates with your Defensia dashboard over HTTPS (TLS 1.2+). Here is exactly what is transmitted:
Sent to dashboard
- •Heartbeats (every 60s) — hostname, IP, OS, agent version, uptime
- •Security events — attacker IP, attack type, severity, timestamp
- •Ban reports — banned IP, reason, duration
- •Scan results — hardening check pass/fail status
Never sent
- •Application source code or file contents
- •Environment variables or secrets
- •Database content or user data
- •Raw log file contents (only parsed attack metadata)
- •SSH keys, passwords, or credentials
No data is shared with third parties by default. Pro plan users can optionally opt in to the Defensia Network, which shares anonymized attacker IPs across all participants.
Monitor Mode
Not ready to enable blocking? Every server can run in Monitor Mode, which detects and reports all attacks without creating any firewall rules. You see everything in your dashboard — SSH brute force, port scans, web attacks — but no IPs are banned. On Pro you switch to active protection when you're comfortable, per server, with one click.
On the Free plan this is not optional: monitor mode is enforced by the platform, so a Free server detects and reports but never writes a firewall rule — no IP ban, no country block, no threat-feed block. We state this here rather than leaving you to discover it from an empty ban list.
Monitor mode governs the firewall, and only the firewall. There is one web-layer exception we would rather disclose than have you find: if your server runs Apache with ModSecurity in blocking mode, the agent installs its own ModSecurity rules on every plan, and those return 403 at the web server regardless of monitor mode or plan. So a Free server with that software already installed does block the patterns those rules cover. Whether it applies to you depends on software we neither install nor control, which is why we will not state it as a Free plan feature.
How Blocking Decisions Are Made
Defensia uses a cumulative scoring model to minimize false positives. A single suspicious request does not trigger a ban. Instead, each detection adds points to an IP's score. The action depends on the total:
| Score | Action |
|---|---|
| 0 – 29 | Normal — no action |
| 30 – 59 | Observe — flagged in dashboard |
| 60 – 79 | Throttle — rate-limited |
| 80 – 99 | Block — 1-hour ban |
| 100+ | Blacklist — 24-hour ban |
Scores decay at -5 points/minute of inactivity and are fully cleared after 30 minutes. Score thresholds per attack type are configurable per server.
Uninstall & Rollback
Complete removal takes under 30 seconds. The installer does it for you — it stops and removes the service for whichever init system is in use, the binary, its backup, the recovery helper and the config directory:
curl -fsSL https://defensia.cloud/install.sh | sudo bash -s -- --uninstall
# Then drop the firewall chain:
sudo iptables -F DEFENSIA 2>/dev/null
sudo iptables -D INPUT -j DEFENSIA 2>/dev/null
sudo iptables -X DEFENSIA 2>/dev/null The agent only creates a dedicated DEFENSIA iptables chain. Removing it restores your firewall to its pre-installation state. No cron jobs, no kernel modules, no system-wide config changes.
One deliberate exception: if the malware scanner quarantined anything, those samples are left at /var/lib/defensia/quarantine rather than deleted — somebody uninstalling after an incident may still need them. The uninstaller tells you when this happens and where to look. Nothing else remains.
Binary Verification
Every release is built via GitHub Actions CI and attached to a public GitHub Release. You can verify the binary you're running matches the public release:
# Check installed version
defensia-agent --version
# Compare checksum with GitHub release
sha256sum /usr/local/bin/defensia-agentThe agent auto-updates from GitHub Releases on each heartbeat cycle, verifying a SHA256 checksum before replacing the binary and rolling back to the previous one if the new version crashes. There is no customer-facing switch to turn this off; pinning a server to a specific version is an operator action, so ask support if you need a server held back.
Compliance Alignment
Defensia is not SOC 2 certified. We are transparent about this. Our infrastructure and processes are aligned with SOC 2 Type II criteria, and Defensia helps your servers meet specific controls within your own compliance frameworks:
- •CC6.1 / CC6.6 — Network security controls, intrusion detection, firewall management
- •CC7.1 / CC7.2 — Monitoring, anomaly detection, incident response
- •CC8.1 — Change management and audit logging
Security Questions?
We welcome security audits and questions. Reach us at security@defensia.cloud or open an issue on GitHub.