Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Ensure Security Group for EC2 Instance Does Not Allow Inbound Traffic Rule

This rule ensures that the Security Group attached to an EC2 instance does not allow inbound traffic from all to TCP port 2379 (etcd).

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

Rule Description:

The security group associated with the EC2 instance should be configured to restrict inbound traffic for port 2379 (etcd) to enhance the security of the instance. This rule makes sure that only authorized sources are allowed to access the EC2 instance via TCP port 2379.

Troubleshooting Steps (if required):

  1. 1.
    Check the security group associated with the EC2 instance.
  2. 2.
    Verify the inbound rules for the security group.
  3. 3.
    Ensure that there is a specific rule denying inbound traffic from all to port 2379.
  4. 4.
    Check if there are any conflicting rules allowing traffic to port 2379.

Necessary Code (if applicable):

No code snippet is required for this rule as it involves making configuration changes to the security group associated with the EC2 instance.

Step-by-Step Guide for Remediation:

  1. 1.
    Log in to the AWS Management Console.
  2. 2.
    Go to the EC2 service section.
  3. 3.
    Select the EC2 instance for which you want to update the security group.
  4. 4.
    Click on the "Security" tab.
  5. 5.
    Identify the security group attached to the EC2 instance and click on the associated security group link.
  6. 6.
    In the security group configuration, locate the inbound rules section.
  7. 7.
    Find the entry for TCP port 2379 (etcd).
  8. 8.
    If there is already a rule allowing inbound traffic from all to port 2379, take note of the rule, as it will need to be deleted.
  9. 9.
    Add a new inbound rule:
    • Click on the "Edit" button next to the inbound rules section.
    • Click on the "Add Rule" button.
    • Select "Custom TCP" as the protocol.
    • Enter "2379" as the port range.
    • Specify the authorized source for inbound traffic. This can be either specific IP ranges or security group IDs.
    • Click on the "Save" button.
  10. 10.
    Review the changes and click on the "Save" button to apply the new rule.
  11. 11.
    If there was a conflicting rule allowing inbound traffic from all to port 2379, locate that rule and delete it:
    • Click on the "Delete" button next to the conflicting rule.
    • Confirm the deletion when prompted.

By following these steps, you have ensured that the security group attached to the EC2 instance does not allow inbound traffic from all to TCP port 2379 (etcd), thereby enhancing the security of your EC2 instance.

Is your System Free of Underlying Vulnerabilities?
Find Out Now