High severity rule requiring VPC security groups to limit TCP and UDP access from all IPs.
Rule | VPC security groups should restrict ingress TCP and UDP access from 0.0.0.0/0 |
Framework | NIST Cybersecurity Framework (CSF) v1.1 |
Severity | ✔ High |
Rule Description:
The VPC security groups should enforce restrictions on ingress TCP and UDP access from the IP range 0.0.0.0/0 in accordance with the NIST Cybersecurity Framework (CSF) version 1. This rule aims to enhance the security of the Virtual Private Cloud (VPC) by minimizing the potential attack surface and mitigating the risk of unauthorized access.
Troubleshooting Steps:
If there are any issues with implementing or enforcing this rule, follow these troubleshooting steps:
Necessary Codes:
If any code snippet is required for compliance with this rule, refer to the following examples:
aws ec2 authorize-security-group-ingress --group-id <security-group-id> --protocol tcp --port <port-number> --cidr 0.0.0.0/0 --region <aws-region>
Replace
<security-group-id>
with the actual ID of the security group, <port-number>
with the specific port number, and <aws-region>
with the appropriate AWS region.resource "aws_security_group_rule" "<rule-name>" {
security_group_id = aws_security_group.<security-group-resource>.id
type = "ingress"
protocol = "tcp"
from_port = <port-number>
to_port = <port-number>
cidr_blocks = ["0.0.0.0/0"]
}
Replace
<rule-name>
with a descriptive name for the rule, <security-group-resource>
with the actual security group resource name, and <port-number>
with the desired port number.Note: Make sure to adapt the above code snippets based on your specific requirements and preferred infrastructure provisioning tool.
Steps for Remediation:
To remediate this rule and enforce ingress TCP and UDP access restrictions from 0.0.0.0/0 in VPC security groups, follow the step-by-step guide below:
Identify the relevant VPC security group: Determine the security group that requires modification to apply the ingress access restrictions.
Update security group rules:
Verify the changes:
Document and communicate:
Final Note:
Maintaining strong security practices within the VPC is crucial for protecting your infrastructure from potential threats. By adhering to the NIST CSF guidelines and implementing necessary ingress TCP and UDP access restrictions, you can bolster the security of your VPC environment.