This rule enforces the restriction of public IP addresses for EC2 instances.
Rule | EC2 instances should not have a public IP address |
Framework | FedRAMP Low Revision 4 |
Severity | ✔ High |
Rule Description:
According to the FedRAMP Low Revision 4 compliance requirements, EC2 instances should not have a public IP address. This ensures that the instances are not directly accessible from the internet to minimize potential security risks. The absence of a public IP address enhances the security posture of the infrastructure by reducing the attack surface, making it less vulnerable to unauthorized access attempts.
Troubleshooting Steps:
If an EC2 instance in your AWS environment has a public IP address, follow these steps to troubleshoot and remediate the issue:
Identify the EC2 instance: Determine the specific instance that has a public IP address assigned to it.
Review the security group settings: Check the security groups associated with the instance to verify if any rules allow inbound traffic from the internet. It is crucial to ensure that there are no rules allowing access from 0.0.0.0/0 (any IP) or specific IP ranges associated with the public internet.
Check for elastic IP associations: Confirm whether the instance has an elastic IP associated with it. Elastic IPs are publicly routable IP addresses that can be a potential security risk if wrongly assigned to an instance.
Review the subnet configuration: Ensure that the subnet associated with the instance does not have a route table configured to send traffic directly to an internet gateway. Instances should ideally be placed in private subnets without internet connectivity.
Validate Network ACL rules: Verify the Network ACL (Access Control List) associated with the subnet and ensure that there are no inbound or outbound rules allowing unrestricted traffic to or from the internet.
Remediation Steps:
To address the issue of an EC2 instance having a public IP address, follow these steps:
By following the above steps, you can ensure that EC2 instances in your environment do not have public IP addresses and comply with the FedRAMP Low Revision 4 requirement. Regular monitoring and auditing are recommended to maintain compliance and address any deviations promptly.