Ensure VCN inbound security lists are stateless

Error: OCI VCN Security list has stateful security rules
Bridgecrew Policy ID: BC_OCI_NETWORKING_2
Checkov Check ID: CKV_OCI_17
Severity: HIGH

OCI VCN Security list has stateful security rules

Description

This policy identifies the OCI Virtual Cloud Networks (VCN) security lists that have stateful ingress rules configured in their security lists. It is recommended that Virtual Cloud Networks (VCN) security lists are configured with stateless ingress rules to slow the impact of a denial-of-service (DoS) attack.

Fix - Runtime

OCI Console

  1. Login to the OCI Console
  2. Type the resource reported in the alert into the Search box at the top of the Console.
  3. Click the resource reported in the alert from the Resources submenu
  4. Click on Ingress rule where Stateless column is set to No
  5. Click on Edit
  6. Select the checkbox STATELESS
  7. Click on Save Changes

Fix - Buildtime

Terraform

  • Resource: oci_core_security_list
  • Arguments: vcn_id + ingress_security_rule
resource "oci_core_security_list" "pass" {
    compartment_id = oci_identity_compartment.tf-compartment.id
    vcn_id = oci_core_vcn.test_vcn.id
    ingress_security_rules {
        protocol = "all"
        source="192.168.1.0/24"
    }
}

Did this page help you?