Skip to main content

More Info:

Route table modifications must generate OCI Events. Unapproved routing changes can facilitate man-in-the-middle attacks or traffic exfiltration paths.

Risk Level

Medium

Address

Compliance, Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • AWS Well Architected Framework
  • BSI C5 (Germany)
  • Brazil LGPD
  • CCPA / CPRA (California)
  • CIS AWS
  • CIS Critical Security Controls v8
  • CMMC 2.0
  • CSA Cloud Controls Matrix v4
  • Cloudanix Best Practice
  • DPDPA
  • Digital Operational Resilience Act (EU)
  • HIPAA
  • HITRUST CSF
  • ISO 27001
  • ISO/IEC 27017
  • ISO/IEC 27018
  • ISO/IEC 27701
  • KSA PDPL
  • MAS Technology Risk Management (Singapore)
  • MITRE ATT&CK (Cloud)
  • NIS2 Directive
  • NIST
  • NIST CSF
  • NIST SP 800-171
  • NYDFS 23 NYCRR 500
  • SOC2
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

Below are concise, console-based steps to set up an OCI Events rule and alert for Route Table changes:

1. Prepare a Notification Channel (if you don’t already have one)

  1. In the OCI Console, open the Navigation menuDeveloper ServicesNotifications.
  2. Click Create topic.
    • Name: e.g., route-table-change-topic
    • Description: e.g., Alert on Route Table changes
  3. After creation, open the topic and click Create subscription.
    • Protocol: e.g., Email
    • Enter your email address.
  4. Confirm the subscription from the email you receive (must be done before alerts will be delivered).

2. Create an Events Rule for Route Table Changes

  1. Open the Navigation menuObservability & ManagementEvents ServiceRules.
  2. Click Create rule.
  3. Rule details
    • Name: e.g., route-table-change-rule
    • Description: Trigger on Route Table create/update/delete
    • Compartment: choose the compartment where your route tables reside.
  4. Condition (Event Pattern)
    • Under Event type, choose:
      • Service: Virtual Cloud Network (VCN) or Networking (name can vary slightly).
      • For Event Type, select the events related to route tables, such as:
        • Route Table - Create
        • Route Table - Update
        • Route Table - Delete
      • If only a generic filter is available, use the JSON pattern and ensure it includes something like:
    • Scope by Compartment and/or VCN if desired, to limit noise.
  5. Actions
    • In Actions, click Add actionNotifications.
    • Select the topic you created earlier (route-table-change-topic).
  6. Click Create rule.

3. (Optional) Test the Rule

  1. Make a controlled change to a Route Table:
    • NetworkingVirtual Cloud Networks → select VCN → Route Tables.
    • Edit a route table (e.g., add a test route) or create/delete a test route table.
  2. Wait a few minutes and verify that the email (or other channel) alert is received.
This completes setting up OCI Monitoring/Alerting for Route Table changes via the OCI console.
Below are step‑by‑step instructions to create an OCI Events rule (via OCI CLI) that alerts on any Route Table changes and sends notifications (e.g., email) using OCI Monitoring/Alerting.

0. Prerequisites

  1. OCI CLI installed and configured (oci setup config completed).
  2. You know:
    • Your compartment OCID (where VCN/route tables live).
    • An email address (for notifications).

1. Create a Notifications Topic (for alerts)

Note the id from the output (this is the topic OCID), e.g.:

2. Create a Subscription to the Topic (email alert)

Check your email and confirm the subscription.

3. Create the Event Rule Actions JSON

Create a file route-table-rule-actions.json:
Replace topicId with the OCID from step 1.

4. Create the Event Rule for Route Table Changes

Use the Events service rule to catch create/update/delete of Route Tables.Known event types for VCN route tables:
  • com.oraclecloud.virtualnetwork.createroutetable
  • com.oraclecloud.virtualnetwork.updateroutetable
  • com.oraclecloud.virtualnetwork.deleteroutetable
Run:
Note the returned rule id for future management.

5. (Optional) Narrow Scope to Specific Compartment/VCN

If you want to restrict to a specific compartment or VCN, you can extend the --condition JSON. Example (filter by compartment):

6. Verify the Rule

List rules to confirm:
You should see your Detect Route Table Changes rule in the output.
Once this is in place, any create/update/delete of a Route Table in that compartment will generate an Event, trigger the rule, and send a notification via the configured topic/subscription.
Below is how to remediate this in OCI using Python: you’ll:
  1. Create (or reuse) a Notifications topic
  2. (Optionally) add an Email subscription
  3. Create an Events rule that triggers on Route Table changes and publishes to that topic
All via the OCI Python SDK.

1. Prerequisites

  • oci Python SDK installed:
  • A working OCI config file (e.g. ~/.oci/config) with:
    • tenancy, user, fingerprint, key_file, region
  • Proper IAM permissions to:
    • Manage events-rules
    • Use ons-topics and ons-subscriptions
    • Read/inspect network resources

2. Event Filter for Route Table Changes

We want to match route table changes. For VCN Route Tables the eventType patterns are:
  • com.oraclecloud.virtualnetwork.createRouteTable
  • com.oraclecloud.virtualnetwork.updateRouteTable
  • com.oraclecloud.virtualnetwork.deleteRouteTable
  • (optional) com.oraclecloud.virtualnetwork.changeRouteTableCompartment
Filter pattern (Events rule) example:
You can also restrict by compartmentId if needed:

3. Python Script – Create Topic, Subscription, and Event Rule

Adjust uppercase placeholders and run.
We must correct: For events rule action to Notifications, OCI SDK uses CreateNotificationServiceActionDetails. Continue.Let’s complete script correctly.

4. Notes

  • For EMAIL subscriptions, the recipient must confirm via the link they receive before alerts start.
  • You can change the filter to be broader/narrower (remove compartmentId if you want all route tables in the tenancy).
  • To integrate with OCI Monitoring/Alarms instead of email, point the Notifications topic to your existing alerting pipeline or use a function that pushes to Monitoring metrics.
Changing the condition or actions on oci_events_rule is in‑place and does not force replacement of the rule.To verify, terraform plan should show either:
  • creation of oci_events_rule.route_table_changes with the above condition, or
  • an in‑place update of the existing oci_events_rule where only the condition (and possibly actions) arguments change to match this configuration.