Decommission Completely¶
The Problem¶
Two strange things showed up in the same week:
- Suricata's dashboard said 0 alerts, but its log file was huge
- On one Docker host, automatic security updates had quietly stopped working
Both turned out to be leftovers from a project I had shut down months earlier.
Leftover #1 — A Cron Job SSHing Into Strangers¶
I'd retired a small fleet of cloud servers and deleted them. But a monitoring script on the monitoring host still ran every minute from root's crontab, trying to SSH into each old server to collect stats.
Cloud providers recycle IP addresses. Those addresses now belonged to other customers. So every minute, my network was making SSH connection attempts to random strangers' servers — which is exactly what an infected machine scanning the internet looks like.
Suricata agreed: rule ET SCAN Potential SSH Scan OUTBOUND dropped it about 880 times every 30 minutes. That flood was what filled the log.
Exposure check: the script used key-only, non-interactive SSH, so no passwords were ever sent. It just looked bad — and would have got my IP onto abuse lists eventually.
Fix: commented out the cron line (with a backup of the crontab), confirmed the alerts stopped.
Leftover #2 — A Dead Repository Breaking apt¶
The same retired project had added a third-party apt repository to the monitoring host. Its signing key had since expired, so every apt-get update failed.
unattended-upgrades runs apt-get update first. When that fails, it doesn't install anything — and it doesn't shout about it. The host had silently stopped getting security updates.
Fix: disabled the dead repository file; apt update came back clean and security updates resumed that night.
The Lesson¶
Turning something off is not the same as removing it. When you retire a service, sweep for everything it touched:
- Cron jobs and systemd timers (
crontab -lfor every user,systemctl list-timers) - apt repositories and keys it added (
/etc/apt/sources.list.d/) - Prometheus scrape targets, Grafana dashboards and alert rules
- Firewall rules, aliases, VLANs, DHCP reservations, DNS overrides
- Reverse proxy entries and certificates
- Credentials, API keys and SSH keys it used — revoke them
- Monitoring agents (Wazuh, PatchMon) for the hosts that no longer exist
And alert on silence. "Suricata silent" and "updates not installing" are now things the monitoring checks for — a security tool that quietly stops working is worse than one that's noisy.