This rule states that EC2 instances should not be assigned a public IP address to enhance security measures.
Rule | EC2 instances should not have a public IP address |
Framework | NIST 800-171 Revision 2 |
Severity | ✔ High |
Rule Description
This rule is designed to ensure compliance with the National Institute of Standards and Technology (NIST) 800-171 Revision 2 security standard. According to this standard, EC2 instances should not have a public IP address assigned to them. Having a public IP address increases the attack surface and potential exposure to unauthorized access and security threats.
Remediation
To remediate this issue and comply with NIST 800-171 Revision 2, follow the step-by-step guide below:
Step 1: Identify instances with public IP addresses
Step 2: Remove public IP addresses
Troubleshooting
Issue: Unable to release the public IP address
Check if the instance is using an Elastic IP address. If so, you need to disassociate the Elastic IP before releasing the public IP. Follow the instructions below to disassociate the Elastic IP:
If the above steps don't resolve the issue, ensure that the instance is not part of an EC2 Auto Scaling group or Elastic Load Balancer. These can prevent the release of public IP addresses. Remove the instance from such groups or load balancers before attempting to release the IP.
Issue: Required public accessibility
Code Sample (if applicable)
No code sample is available for this rule as it requires manual configuration and management through the AWS Management Console.
It's important to periodically review your EC2 instances and ensure that they do not have public IP addresses assigned to them to maintain compliance with NIST 800-171 Revision 2 security standards.