Medium
EC2
Regional
EC2 subnets should not automatically assign public IP addresses
CIS
Description
Flags EC2 subnets configured to automatically assign public IPv4 addresses or IPv6 addresses to instances at launch.
Remediation
To comply with this control, modify the subnet settings to disable the automatic assignment of public IPv4 and IPv6 addresses.
Steps
- Sign in to the AWS Management Console and open the Amazon VPC console at https://console.aws.amazon.com/vpc/.
- In the navigation pane, click on 'Subnets'.
- Select the subnet you want to modify.
- In the 'Subnet Actions' dropdown menu, select 'Modify auto-assign IP settings'.
- Uncheck 'Auto-assign public IPv4 address' and 'Auto-assign IPv6 address'.
- Click 'Save' to apply the changes.
Compliance
CIS