Ensure Security Group attached to ELB instance does not allow inbound traffic from all to TCP 27018 (MongoDB)

Error: Security Group attached to ELB instance allows inbound traffic from all to TCP 27018 (MongoDB)

Bridgecrew Policy ID: BC_AWS_NETWORKING_24
Severity: HIGH

Security Group attached to ELB instance allows inbound traffic from all to TCP 27018 (MongoDB)

Description

To prevent data theft and data loss, all Mongo DBs should be protected with an access control mechanism.

Fix - Runtime

Procedure

Disable anonymous access to MongoDB.