TMAegis
Plus de règles pour mongodb

TMA-MONGO-BIND-ALL

Ensure mongod does not listen on all interfaces

ÉlevéeNiveau 1Automatiséemongodb

Description

bindIp 0.0.0.0 or bindIpAll exposes the database on every network interface; bind only to localhost and required private addresses. Checks the YAML config file /etc/mongod.conf (SKIP when it does not exist).

Méthode de vérification

Méthode d'audit: Motif de fichier

Fichier
/etc/mongod.conf
Motif
(?m)^[ \t]*(?:bindIp:[^#\n]*0\.0\.0\.0|bindIp:[^#\n]*::(?:[ ,'\x22]|$)|bindIpAll:[ \t]*true)

Méthode de correction

Méthode de correction: Recommandation ou correctif d'infrastructure

Set net.bindIp to 127.0.0.1 plus the specific private addresses required (remove bindIpAll), then restart mongod

Propriétés

Systèmes d'exploitation
Tous
Étiquettes
mongodbdatabasenetwork
Référence
CIS MongoDB Benchmark - Network Exposure / Bind Address (verify section number for your release)

Vérifier cet hôte

Exécutez cette commande sur une machine que vous êtes autorisé à auditer. L'analyse est en lecture seule.

shell
tmaegis scan --target mongodb