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>_