6.28 Ensure EC2 instances within App Tier have no Elastic / Public IP addresses associated

Information

All subnets have an attribute that determines whether instances launched into that subnet receive a public IP address. The public IP address is assigned to the default network interface (eth0). By default, instances launched into a default subnet are assigned a public IP address. A public IP address is mapped to the primary private IP address through network address translation (NAT).

An Elastic IP address is a static, public IP address designed for dynamic cloud computing. You can associate an Elastic IP address with any instance or network interface for your VPC. With an Elastic IP address, you can mask the failure of an instance by rapidly remapping the address to another instance in your VPC.
Without any Public or Elastic IP associated on the EC2 instance in the App tier, no inbound traffic can reach the instance from the Internet.

NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.

Solution

Using the Amazon unified command line interface:

* If in the above output the "IpOwnerId" is "amazon" the public Ip is not an Elastic IP and it cannot be manually disassociated from the instance after launch:

* Make sure that the App tier subnet doesn't assign public Ip's at launch (run the command for all App tier subnets)

aws ec2 modify-subnet-attribute --subnet-id _<app_tier_subnet1>_ --no-map-public-ip-on-launch

* Create an AMI from the instance and launch a replacement instance in the same subnet



* If in the above output the "IpOwnerId" is an AWS account number, this is an Elastic IP and it can be disassociated:

aws ec2 disassociate-address --public-ip _<elastic_ip_address>_

See Also

https://workbench.cisecurity.org/files/260

Item Details

Category: SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|SC-7

Plugin: amazon_aws

Control ID: 72fbb4876f95d6fb57badc4c6041721e1d12da4e2c073c37178fbed24b005325