VPC security group rules should not permit ingress from ‘’ to TCP port 5900 (Virtual Network Computing)


Security groups provide stateful filtering of ingress/egress network traffic to AWS resources. AWS recommends that no security group allow unrestricted ingress access to port 5900. Removing unfettered connectivity to remote console services reduces a server’s exposure to risk.

Console Remediation Steps

  • Navigate to VPC.

  • In the left pane, click Security Groups.

  • For each security group, perform the following:

    • Select the security group.

    • Click the Inbound Rules tab.

    • Identify the rules to be removed.

    • Click the x in the Remove column.

    • Click Save.

CLI Remediation Steps

  • Remove the inbound rule(s) that permits unrestricted ingress to TCP port 5900 from the selected Security Group:

    • aws ec2 revoke-security-group-ingress --region <region> --group-name <group_name> --protocol tcp --port 5900 --cidr

  • Optionally add a more restrictive ingress rule to the selected Security Group:

    • aws ec2 authorize-security-group-ingress --region <region> --group-name <group_name> --protocol tcp --port 5900 --cidr <cidr_block>