More Info:

EC2 security groups should not allow unrestricted outbound/egress access.

Risk Level

High

Address

Security

Compliance Standards

SOC2, PCIDSS, HIPAA

Triage and Remediation

Remediation

To remediate the issue of unrestricted outbound access in AWS, follow these steps:

  1. Log in to your AWS console and navigate to the VPC dashboard.

  2. Select the VPC for which you want to restrict outbound access.

  3. Click on the “Security Groups” option in the left-hand menu.

  4. Select the security group that is associated with the instance(s) that have unrestricted outbound access.

  5. Click on the “Outbound Rules” tab.

  6. Remove any rules that allow unrestricted outbound access (i.e., rules with a destination of “0.0.0.0/0” or ”::/0”).

  7. Add new outbound rules that restrict access to specific IP addresses or ranges, protocols, and ports as per your requirements.

  8. Save the changes and verify that the new outbound rules are in effect.

By following these steps, you can remediate the issue of unrestricted outbound access in AWS and ensure that your instances are only able to communicate with authorized destinations.

Additional Reading: