This rule ensures that VPC Security Groups restrict Ingress SSH access from the global IP range 0.0.0.0/0.
Rule | VPC security groups should restrict ingress SSH access from 0.0.0.0/0 |
Framework | NIST 800-171 Revision 2 |
Severity | ✔ High |
Rule Description:
VPC security groups should restrict ingress SSH (Secure Shell) access from the IP range of 0.0.0.0/0 for compliance with NIST 800-171 Revision 2. This rule ensures that only authorized users within a specific IP range can establish SSH connections to resources within the Virtual Private Cloud (VPC).
Troubleshooting Steps:
If SSH access is not properly restricted, it poses a security risk, as it allows any IP address (0.0.0.0/0) to attempt SSH connections. Here are the troubleshooting steps to ensure the restriction is properly implemented:
Necessary Code:
The following code snippet provides an example of how to create a new security group rule for SSH ingress access restricted to specific IP ranges using the AWS CLI:
aws ec2 authorize-security-group-ingress \ --group-id <security-group-id> \ --protocol tcp \ --port 22 \ --cidr <valid-ip-range>
Replace
<security-group-id>
with the actual ID of the security group that needs to be modified, and <valid-ip-range>
with the desired IP range (e.g., 192.168.0.0/24) allowed for SSH access.Step-by-Step Guide for Remediation:
To remediate the VPC security group to restrict SSH access from 0.0.0.0/0 for compliance with NIST 800-171 Revision 2, follow these steps:
By following these steps, the VPC security group will be configured to restrict SSH access from 0.0.0.0/0, adhering to the NIST 800-171 Revision 2 requirements.