Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Disable Automatic Public IP Assignment in ECS Services

Checks if ECS services are configured to prevent automatic public IP assignments, enhancing network security by limiting public internet exposure.

RuleECS services should not have public IP addresses assigned to them automatically
FrameworkAWS Foundational Security Best Practices
Severity
High

Rule Description:

By disabling the automatic assignment of public IP addresses to ECS services, organizations can enhance security by reducing potential exposure to external threats and unauthorized access. Public IP addresses are commonly targeted by attackers, and disabling their automatic assignment helps in mitigating security risks.

Troubleshooting Steps:

If ECS services are found to have public IP addresses assigned automatically, follow the steps below to disable this functionality:

  1. 1.
    Review the ECS service configuration to ensure that the public IP assignment is turned off.
  2. 2.
    Verify the network configurations of the service and associated resources.
  3. 3.
    Check the subnet settings to confirm that the ECS service is not configured to receive public IP addresses.

Necessary Codes:

To disable the automatic assignment of public IP addresses to ECS services, you can utilize the following code when creating or updating the service:

{
  "ipAddressType": "PRIVATE"
}

This code snippet will specify that the ECS service should only have a private IP address assigned to it, instead of a public one.

Remediation Steps:

To remediate this issue and ensure that ECS services do not have public IP addresses assigned automatically, follow the steps below:

  1. 1.
    Open the AWS Management Console and navigate to the ECS service that requires modification.
  2. 2.
    Locate the network configuration settings of the service.
  3. 3.
    Update the service configuration to include the "ipAddressType" parameter with the value set to "PRIVATE".
  4. 4.
    Save the changes to apply the updated configuration.
  5. 5.
    Verify that the ECS service now only has a private IP address assigned to it.

By following these steps, you can enhance the security of your ECS services by preventing the automatic assignment of public IP addresses, in line with AWS foundational security best practices.

Is your System Free of Underlying Vulnerabilities?
Find Out Now