CloudWiki
Rules
Critical

Ensure there is no unrestricted inbound access to TCP port 27017 (MongoDB)

Security & Compliance
Description

Ensure there is no unrestricted inbound access to TCP port 27017 (MongoDB) is an important security measure to protect the MongoDB database from unauthorized access and potential attacks. TCP port 27017 is the default port used by MongoDB for client-to-server communication. If left open and unrestricted, attackers could potentially gain access to sensitive data or modify the database. Therefore, it is important to ensure that only authorized users and systems have access to this port.

Remediation

To ensure there is no unrestricted inbound access to TCP port 27017 (MongoDB), you can take the following remediation steps:

  1. Identify all the security groups and network ACLs that have rules allowing inbound access to TCP port 27017.
  2. Modify the security group and network ACL rules to restrict access to only the necessary sources or IP ranges that require access to the MongoDB instance.
  3. If possible, enable SSL/TLS encryption for MongoDB traffic to ensure secure communication.
  4. Consider implementing network segmentation to further restrict access to the MongoDB instance by isolating it from the public internet and other resources that do not require access.
  5. Monitor the security group and network ACL rules regularly to ensure that no unauthorized changes have been made, and adjust the rules as necessary to maintain secure access to the MongoDB instance.
Enforced Resources
Note: Remediation steps provided by Lightlytics are meant to be suggestions and guidelines only. It is crucial to thoroughly verify and test any remediation steps before applying them to production environments. Each organization's infrastructure and security needs may differ, and blindly applying suggested remediation steps without proper testing could potentially cause unforeseen issues or vulnerabilities. Therefore, it is strongly recommended that you validate and customize any remediation steps to meet your organization's specific requirements and ensure that they align with your security policies and best practices.