Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

Ensure Routing Tables for VPC Peering Are "Least Access" Rule

This rule ensures that routing tables for VPC peering are configured to provide the least access possible.

RuleEnsure routing tables for VPC peering are "least access"
Frameworkcis_v140
Severity
High

CIS v1.4.0 Rule: VPC Peering Least Access

Description of the Rule

"AWS VPC (Virtual Private Cloud) peering allows private connectivity between two VPCs, enabling you to route traffic via private IP addresses. The 'least access' principle in the context of VPC peering is about ensuring that only necessary routes are enabled in the routing tables to prevent any unwanted access or data exposure between peered VPCs. This principle is aligned with the CIS (Center for Internet Security) AWS Foundations Benchmark recommendations, which focus on security best practices."

Troubleshooting Steps

Troubleshooting issues related to routing tables in VPC peering typically involve the following:

  1. 1.
    Verify the existence of VPC peering connections.
  2. 2.
    Ensure that the routes in the VPC routing tables are minimal and only allow traffic to and from required networks.
  3. 3.
    Check that security groups and network ACLs (access control lists) are appropriately configured to enforce least access principles.

If there is a breakdown in connectivity or an over-permissive route:

  • Review the routes in each VPC's routing table for any overly permissive CIDR blocks.
  • Verify that network ACLs and security group rules align with the least access principle.
  • Confirm that there are no overlapping CIDR ranges causing route conflicts.

Necessary Codes and CLI Commands

CLI Command to Describe VPC Peering Connections

aws ec2 describe-vpc-peering-connections --region <your-region>

Replace

<your-region>
with the applicable AWS region.

CLI Command to Describe Route Tables

aws ec2 describe-route-tables --region <your-region>

Replace

<your-region>
with the applicable AWS region.

CLI Command to Modify the Route Table (If Necessary)

aws ec2 replace-route --route-table-id <route-table-id> --destination-cidr-block <destination-cidr> --vpc-peering-connection-id <peering-connection-id> --region <your-region>

Replace

<route-table-id>
,
<destination-cidr>
,
<peering-connection-id>
, and
<your-region>
with your specific values.

Step-by-Step Guide for Remediation

Step 1: Evaluate Current Routes

Review current routing tables' routes to ensure they comply with least access practices. This can be done either through the AWS Management Console or using the AWS CLI.

Step 2: Amend Overly Permissive Routes

If any routes are too permissive, they must be replaced with more restrictive routes that only allow necessary traffic.

Step 3: Update Security Groups and ACLs

Review and update security groups and network ACLs to ensure they are as restrictive as necessary, complying with the least access principle.

Step 4: Continuous Monitoring

Set up regular reviews and automated monitoring to ensure compliance is maintained over time, and any changes are reviewed and authorized.

By adhering to this guide and regularly reviewing and maintaining least access routes, an AWS environment can be aligned with CIS recommendations granting you not only strong security posture but also optimizing your VPC for search engines as it demonstrates a well-maintained and compliance-focused infrastructure.

Is your System Free of Underlying Vulnerabilities?
Find Out Now