VPS & Server audit fixes
Logging & Monitoring: fixing all 3 checks
The logging and monitoring audit checks whether this host blocks repeated login failures and keeps the evidence, covering brute-force protection, log rotation and failed SSH logins in the auth log.
All three checks are marked as needing root and two of them genuinely skip without it: Brute-Force Protection can see that fail2ban is running but cannot list its jails, and Failed SSH Logins cannot open /var/log/auth.log, /var/log/secure or the journal. System Log Rotation never skips, and a host with no logrotate binary at all warns rather than skipping.
- Checks in this audit
- 3
- Rated high severity
- 0
- Need root or sudo
- 3
- Automated run time
- ~9s
Transcribed from the vps-security-logging-monitoring audit script. For what the audit covers rather than how to fix it, see the Logging & Monitoring checklist, or how the CtrlOps Security Audit runs.
Every check
Find your finding
Listed in the order the audit runs them. Take the check name from the third field of the result line and open its page.
- 01Brute-Force ProtectionSoonChecks whether fail2ban is installed, running and has active jails, or another brute-force blocker is in placeSeverity: MEDIUMNeeds rootCan return FAIL · WARN · SKIP · PASS
- 02System Log RotationSoonChecks whether logrotate is installed and rotating, and flags log files that have grown past 100MBSeverity: MEDIUMNeeds rootCan return WARN · PASS
- 03Failed SSH LoginsSoonChecks the auth log for failed SSH login attempts in the last 24 hoursSeverity: LOWNeeds rootCan return WARN · SKIP · PASS
Why checks skip
A SKIP is never a pass
A skipped check verified nothing at all. The most common cause is privilege: 3 of the 3 checks in this audit need root for a complete result. Before every run, each script works out which of four privilege modes it is in.
rootThe audit runs as UID 0.Every privileged branch runs directly. No check skips for lack of permission.nopasssudo -n true succeeds, so the account has passwordless sudo.Privileged commands run through sudo -n.passA sudo password was supplied in the CtrlOps audit settings and accepted.Privileged commands run through sudo -S.noneSKIPNone of the above worked.CAN_ROOT=0. Every privileged branch returns SKIP with a "Need root" message rather than guessing.If many checks skip with a “need root” message, run the audit as root, grant the audit account sudo (with or without NOPASSWD), or supply the sudo password in the CtrlOps audit settings.
Keep going
Related audits
Yes, and it usually means password authentication is switched off. The check counts lines containing the literal string "Failed password", which sshd only writes when a password attempt was possible; with PasswordAuthentication no, the same attackers generate "Invalid user" and "Connection closed by authenticating user" lines instead, and none of those are counted. A low number is therefore evidence about your auth configuration, not about how quiet the host is. The file branches count today's entries while the journal branch counts the last 24 hours, so the two disagree around midnight.
The check looks for /var/log/*.1 or /var/log/*.gz as evidence that something rotated. A journald-only host, which covers Fedora, Arch and minimal Debian 12 images with no rsyslog, never produces those files, because journald rotates its own binary journals under /var/log/journal instead. That makes the warning a false positive there; confirm with journalctl --disk-usage and the SystemMaxUse setting in journald.conf. A host less than a day old simply has not rotated anything yet.
The check reads the jail list from fail2ban-client status and stops there, so it confirms a jail exists without confirming that jail is reading a log file that exists. The common cause on Debian 12 and any host without rsyslog is an sshd jail pointed at /var/log/auth.log when that file was never created, in which case the jail runs and matches nothing. Set backend = systemd in jail.local, restart fail2ban, and verify with fail2ban-client status sshd: a jail showing 0 total failures after days of traffic on a public IP is doing nothing.
Stop juggling tools. Start managing fleets.
One app. All your servers. No context switching. Free to start, free to leave.
Start instantly · No credit card · Cancel anytime