Database audit fixes
Network Isolation: fixing all 7 checks
The network isolation audit reads each detected engine's bind address and every listening TCP socket on the host, so a failure means a database port is answering on an address other than loopback.
The four binding checks are keyed to engine detection, so each reports SKIP with "not installed" when its engine is absent, then skips a second way on privilege: PostgreSQL and Redis when the audit account cannot read postgresql.conf or redis.conf as root, MySQL when no bind-address can be read from the server or from /etc/mysql. Exposed Database Ports is the exception: it skips only when neither ss nor netstat exists on the host, which makes it the one check here that still reports on an engine the others could not reach.
Transcribed from the database-security-network-isolation audit script. For what the audit covers rather than how to fix it, see the Network Isolation checklist.
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.
Database Engines
SoonInventory of detected database engines (MySQL/MariaDB, PostgreSQL, MongoDB, Redis, MSSQL) and their versions
LowNo root2 resultsMySQL Network Binding
SoonCheck whether MySQL/MariaDB is bound to localhost or has TCP networking disabled
HighNeeds root3 resultsPostgreSQL Network Binding
SoonCheck whether PostgreSQL's listen_addresses is restricted to localhost
HighNeeds root3 resultsMongoDB Network Binding
SoonCheck whether MongoDB's bindIp is restricted to localhost
HighNeeds root4 resultsRedis Network Binding
SoonCheck Redis bind directive and protected-mode setting for external exposure
HighNeeds root4 resultsExposed Database Ports
SoonCheck for well-known database ports listening on external interfaces
HighNo root3 resultsWeb Database Admin Tools
SoonCheck for phpMyAdmin, Adminer or pgAdmin footprints that are frequently brute-forced
MediumNo root2 results
How the Network Isolation audit reads your server
Every check in this audit runs after the same preamble, and several of its results only make sense once you know what that preamble could and could not see.
Engine detection: HAS_MY, HAS_PG, HAS_MG, HAS_RD are set from client binaries, server processes or config directories. MYOK=1 only if mysql -N -e 'SELECT 1' works as root over the socket; PGOK=1 only if su postgres -c 'psql -X -tAc "SELECT 1"' works. RDCONF is /etc/redis/redis.conf or /etc/redis.conf; MGCONF is /etc/mongod.conf. Containerised databases are not detected by these probes; audit them with the Docker checks or exec into the container.
A SKIP is never a pass
A skipped check verified nothing at all. The most common cause is privilege: 4 of the 7 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.
| Mode | How it is reached | What it means for your results |
|---|---|---|
root | The audit runs as UID 0. | Every privileged branch runs directly. No check skips for lack of permission. |
nopass | sudo -n true succeeds, so the account has passwordless sudo. | Privileged commands run through sudo -n. |
pass | A sudo password was supplied in the CtrlOps audit settings and accepted. | Privileged commands run through sudo -S. |
none | None 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.
Network Isolation questions
Run all 7 Network Isolation checks, in one click
CtrlOps runs this audit over your existing SSH connection - no agents, no scripts to manage. $7/user/month after a 1 month free trial - no credit card required.
✓ Start instantly·✓ No credit card·✓ No sneaky autorenewals