This rule ensures that VPC security groups restrict ingress TCP and UDP access from 0.0.0.0/0.
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: Restrict Ingress TCP and UDP Access from 0.0.0.0/0 for CISA Cyber Essentials
Description
This rule aims to ensure that the ingress (incoming) TCP and UDP traffic in your VPC's security groups is appropriately restricted, specifically for compliance with the CISA Cyber Essentials framework. By limiting access from the 0.0.0.0/0 IP range (also known as "anywhere") for TCP and UDP protocols, you are implementing a measure to mitigate potential security risks and unauthorized access to your VPC resources.
This rule aligns with best practices for network security and helps safeguard sensitive data and resources hosted within your VPC.
Possible Issues
Troubleshooting Steps
Necessary Code
The necessary code snippet provides an example of how to modify the ingress rules using the AWS Command Line Interface (CLI). Modify the template as per your specific requirements.
# AWS CLI command to modify the security group ingress rule aws ec2 authorize-security-group-ingress --group-id <security_group_id> --protocol tcp --port <port_number> --cidr 0.0.0.0/0 aws ec2 authorize-security-group-ingress --group-id <security_group_id> --protocol udp --port <port_number> --cidr 0.0.0.0/0
Ensure you replace
<security_group_id>
with the actual ID of the security group you want to modify, and <port_number>
with the desired TCP/UDP port number.Step-by-Step Guide for Remediation
0.0.0.0/0
.0.0.0.0/0
.Note: Remember to prioritize access to the necessary ports and IP ranges as required by your applications.