Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: Ensure Security Group Does Not Allow Inbound Traffic to TCP 27018 (MongoDB)

This rule ensures that the Security Group attached to EC2 instance restricts inbound traffic to TCP 27018 (MongoDB).

RuleEnsure Security Group attached to EC2 instance does not allow inbound traffic from all to TCP 27018 (MongoDB)
FrameworkCloudDefense.AI Security
Severity
High

Rule Description:

The security group attached to the EC2 instance should not allow inbound traffic from all sources to TCP port 27018, which is commonly used for MongoDB, in order to maintain proper security and prevent unauthorized access.

Troubleshooting Steps (if applicable):

  1. 1.
    Verify the security group configuration of the EC2 instance.
  2. 2.
    Check if inbound rules exist allowing traffic to TCP port 27018 from all sources.
  3. 3.
    Identify the security group that contains the problematic rule.
  4. 4.
    Remove the offending inbound rule or modify it to restrict access to specific trusted sources.

Necessary Codes (if applicable):

N/A

Step-by-step Guide for Remediation:

  1. 1.
    Login to the AWS Management Console.
  2. 2.
    Navigate to the EC2 service.
  3. 3.
    Select the appropriate EC2 instance that needs to be checked.
  4. 4.
    Scroll down to the "Security" section and click on the security group ID attached to the instance.
  5. 5.
    In the security group details, locate the inbound rules.
  6. 6.
    Look for any rule allowing all inbound traffic to TCP port 27018.
  7. 7.
    To remove the rule, click on the "Actions" button and select "Remove rule."
  8. 8.
    Confirm the removal of the rule if prompted.
  9. 9.
    If you want to restrict access to specific trusted sources, click on the "Actions" button and select "Edit inbound rules."
  10. 10.
    Modify the existing rule to specify the desired source IP range or security group for inbound traffic to TCP port 27018.
  11. 11.
    Save the new rule configuration.
  12. 12.
    Verify that the unwanted inbound access to TCP port 27018 has been removed or restricted to trusted sources.
  13. 13.
    Repeat the process for any other security groups associated with the EC2 instance if necessary.

By ensuring that the security group attached to the EC2 instance does not allow inbound traffic from all to TCP port 27018, you enhance the security posture of your MongoDB server and reduce the risk of unauthorized access or attacks. This helps to maintain the integrity and confidentiality of your data.

Is your System Free of Underlying Vulnerabilities?
Find Out Now