This rule ensures VPC default security group restricts inbound and outbound traffic.
Rule | VPC default security group should not allow inbound and outbound traffic |
Framework | NIST 800-53 Revision 5 |
Severity | ✔ Medium |
Rule Description:
The VPC default security group should not allow any inbound or outbound traffic as per the NIST 800-53 Revision 5 security guidelines.
This rule ensures that the default security group, which is automatically created for every Amazon Virtual Private Cloud (VPC), is configured to restrict all network traffic, minimizing the risk of unauthorized access or data exfiltration.
Troubleshooting Steps:
If you find that the VPC default security group allows inbound or outbound traffic, you can follow these troubleshooting steps to remediate the issue:
Required Codes:
To remediate the VPC default security group to disallow inbound and outbound traffic, you may need to use the following AWS Command Line Interface (CLI) commands:
aws ec2 describe-security-groups --query 'SecurityGroups[?GroupName==`default`]'
group-id
with the actual ID of the default security group):aws ec2 revoke-security-group-ingress --group-id <group-id> --protocol -1 --cidr 0.0.0.0/0
group-id
with the actual ID of the default security group):aws ec2 revoke-security-group-egress --group-id <group-id> --protocol -1 --cidr 0.0.0.0/0
Step-by-Step Guide for Remediation:
Open the AWS CLI or AWS Management Console.
Identify the default security group associated with your VPC:
aws ec2 describe-security-groups --query 'SecurityGroups[?GroupName==`default`]'
Review the inbound rules:
<group-id>
with the actual ID of the default security group):aws ec2 revoke-security-group-ingress --group-id <group-id> --protocol -1 --cidr 0.0.0.0/0
Review the outbound rules:
<group-id>
with the actual ID of the default security group):aws ec2 revoke-security-group-egress --group-id <group-id> --protocol -1 --cidr 0.0.0.0/0
Verify the changes:
By following these steps and removing any inbound and outbound rules allowing traffic, you will ensure compliance with the NIST 800-53 Revision 5 security guidelines for the VPC default security group.