Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Rule: VPC Security Groups Should Restrict Ingress SSH Access from 0.0.0.0/0

This rule ensures that VPC security groups restrict SSH access from all IP addresses.

RuleVPC security groups should restrict ingress SSH access from 0.0.0.0/0
FrameworkNIST Cybersecurity Framework (CSF) v1.1
Severity
High

Rule Description:

This rule enforces that VPC security groups must restrict ingress SSH access only from specific IP addresses and not allow access from any source (0.0.0.0/0). The rule is implemented to align with the security guidelines provided by the NIST Cybersecurity Framework (CSF) version 1.

Troubleshooting Steps:

If SSH access is required from specific IP addresses, ensure that the security group rules are properly configured. If there are any issues with SSH access or restricted IP ranges, the following steps can be followed for troubleshooting:

  1. 1.

    Verify Security Group Rules: Check the security group associated with the VPC and ensure that the ingress rules for SSH are configured correctly. Make sure that the source IP addresses or ranges are properly defined.

  2. 2.

    Check Network ACLs: If SSH traffic is still not being restricted, verify the network ACLs (Access Control Lists) associated with the subnets. Ensure that there are no permissive rules allowing inbound SSH traffic from all sources.

  3. 3.

    Verify VPC Routing: Verify that the VPC routing tables are properly configured to allow SSH traffic from the desired IP ranges. Check if any misconfiguration or routing issues are causing SSH traffic to bypass the security group restrictions.

  4. 4.

    Check VPC Flow Logs: Enable VPC Flow Logs to capture network traffic data and analyze if SSH traffic is being blocked or allowed as expected. This can help identify any unexpected IP addresses or potential misconfigurations affecting the SSH access restrictions.

Necessary Codes:

There are no specific codes associated with this rule. The configuration changes need to be made within the AWS Management Console or by using AWS Command Line Interface (CLI) commands.

Step-by-Step Remediation:

To restrict SSH access in VPC security groups according to NIST Cybersecurity Framework (CSF) v1 guidelines, follow these steps:

  1. 1.

    Log in to the AWS Management Console.

  2. 2.

    Navigate to the VPC Dashboard.

  3. 3.

    Select "Security Groups" from the left-side menu.

  4. 4.

    Identify the security group associated with the VPC where SSH access needs to be restricted.

  5. 5.

    Select the security group and click on the "Inbound Rules" tab.

  6. 6.

    Locate the rule allowing SSH (usually using port 22) with the source set to "0.0.0.0/0" and click on the "Edit" button next to it.

  7. 7.

    Change the source IP address or range to the desired IP addresses that are allowed to access SSH. This may include specific CIDR blocks, IP addresses, or a range of IP addresses.

  8. 8.

    Click on the "Save" or "Apply Changes" button to update the security group rule.

  9. 9.

    Repeat the same steps for any additional security groups or rules that allow SSH access.

  10. 10.

    Verify that the SSH access restriction is in effect by attempting to connect to the server from an IP address that is not included in the allowed range. SSH access should be denied.

  11. 11.

    Monitor VPC Flow Logs and regularly review security group settings to ensure ongoing compliance with the restriction on SSH access.

By following these steps, SSH access to the VPC instances will be restricted, helping to align with the NIST CSF v1 guidelines and enhance the overall security posture of the VPC environment.

Is your System Free of Underlying Vulnerabilities?
Find Out Now