This rule ensures that VPC security groups restrict TCP and UDP access from all sources.
Rule | VPC security groups should restrict ingress TCP and UDP access from 0.0.0.0/0 |
Framework | CISA-cyber-essentials |
Severity | ✔ High |
VPC Security Group Rule for CISA Cyber Essentials
Rule Description
The VPC security group rule is aimed at ensuring that the ingress traffic for TCP and UDP protocols in the VPC security group is restricted and allows access only from specific IP ranges, rather than allowing access from any IP address (0.0.0.0/0). This rule is implemented to enhance the security posture of the VPC and complies with the CISA Cyber Essentials policy.
Troubleshooting Steps (if applicable)
Necessary Code (if applicable)
If you are using cloud infrastructure as code, such as AWS CloudFormation or Terraform, below is an example code snippet to restrict ingress TCP and UDP access from 0.0.0.0/0:
resource "aws_security_group" "example" { # ... other configuration for the security group ... ingress { from_port = 0 to_port = 65535 protocol = "tcp" cidr_blocks = ["x.x.x.x/xx"] # Specify specific IP range(s) instead of 0.0.0.0/0 } ingress { from_port = 0 to_port = 65535 protocol = "udp" cidr_blocks = ["x.x.x.x/xx"] # Specify specific IP range(s) instead of 0.0.0.0/0 } # ... other configuration for the security group ... }
Please replace
"x.x.x.x/xx"
with the actual IP range(s) that need to be allowed.Step-by-Step Guide for Remediation
0.0.0.0/0
with the desired specific IP range(s) based on the policy requirements.By following these steps, you can successfully implement the VPC security group rule to restrict ingress TCP and UDP access from 0.0.0.0/0 according to the CISA Cyber Essentials policy.