Skip to main content

More Info:

RouteTableChange events must be monitored. Unauthorized route table edits can redirect sensitive internal traffic to malicious external endpoints or expose private subnets.

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

In OCI you don’t get a native “metric” for route table changes; instead you use Events + Notifications (and optionally Monitoring only if you build custom metrics). For a standard console-based setup, do this:

1. Prepare a Notifications Topic

  1. Sign in to OCI Console.
  2. From the left hamburger menu, go to Developer Services → Application Integration → Notifications.
  3. Make sure you are in the correct compartment (top-left compartment selector).
  4. Click Create Topic.
    • Name: e.g., route-table-change-alerts
    • Description: e.g., Alerts for route table and route rule changes
    • Compartment: choose the desired compartment.
  5. Click Create.

Add at least one subscription (email, Slack, etc.)

  1. Open the topic you just created.
  2. Click Create Subscription.
    • Protocol: e.g., Email.
    • Email: enter your email address.
  3. Click Create.
  4. Go to your email inbox and confirm the subscription.

2. Create an Event Rule for Route Table Changes

OCI emits Events for VCN and route table changes; you’ll create a rule to catch them.
  1. From the left menu, go to Observability & Management → Events Service.
  2. Click Rules in the left pane.
  3. Make sure you are in the same region and compartment where you want to manage VCNs/route tables.
  4. Click Create Rule.

Define the rule

  1. Name: e.g., DetectRouteTableChanges.
  2. Description: e.g., Trigger notifications on route table and route rule changes.
  3. Rule Status: leave as Enabled.
  4. Under Rule Conditions, choose:
    • Event Type: click Browse, then:
      • Service: Virtual Cloud Network (VCN).
      • Under “Event Types”, select all that are relevant, for example (names may vary slightly by region/tenancy):
        • CreateRouteTable
        • UpdateRouteTable
        • DeleteRouteTable
        • CreateRouteRule
        • UpdateRouteRule
        • DeleteRouteRule
    • Optionally, narrow by Compartment if you only want alerts for specific compartments.
If the UI shows a single grouped type like “Route Table – Update” or similar, select all route-table-related event types visible.

Choose action: send notification

  1. In Actions, click Add Action.
  2. Action Type: Notifications.
  3. Topic: choose the topic you created earlier, e.g., route-table-change-alerts.
  4. Click Create (or Create Rule).
Now any create/update/delete of a route table or its rules that matches the rule conditions will generate a notification.

3. (Optional) Refine Scope with Event Filters

If needed, you can restrict alerts further:
  1. Edit the rule (open the rule → Edit).
  2. Under Rule Conditions, you can:
    • Constrain to specific route tables by compartment.
    • Add an advanced filter (JSON) using attributes like data.resourceName, data.compartmentId, or data.additionalDetails if you want very fine-grained control (e.g., only a particular route table).
Example (conceptual) advanced filter JSON snippet:
(Use the console’s helper to ensure the exact attribute names for your tenancy; they can be inspected from a sample event.)

4. (Optional) Tie into Monitoring Alarms via Custom Metrics

If your policy explicitly requires a Monitoring → Alarms object, you can:
  1. Use Service Connector Hub:
    • Source: Logging (Audit or VCN logs).
    • Task: Logging Analytics or custom metrics.
    • Target: Monitoring (create a custom metric when an event indicating route table change appears).
  2. Then in Observability & Management → Monitoring → Alarms, create an alarm on that custom metric (e.g., trigger when metric value ≥ 1 in last 5 minutes).
This is more complex and typically unnecessary unless your organization mandates using Monitoring alarms specifically.

5. Validate

  1. Make a small change to a non-critical route table (e.g., add a dummy route, then remove it).
  2. Confirm:
    • The event rule shows Recent Activity after the change.
    • You receive a notification on your configured channel (email, etc.).
This completes configuration of “route table change alarm” using OCI’s console-based alerting (Events + Notifications, with optional Monitoring if your policy requires it).
In OCI you don’t get a native metric for “route table changed”, so the correct way to implement this “alarm” is:
  1. Use OCI Events to detect RouteTable change events
  2. Send those events to Notifications (ONS)
  3. The notification (email/Slack/PagerDuty, etc.) is your “alarm”
Below are step‑by‑step CLI instructions.

0. Prerequisites

  • OCI CLI configured (oci setup config)
  • You know:
    • Compartment OCID where your VCN/route tables live
    • Your tenancy region (e.g. us-ashburn-1)
    • Your target notification email address
For brevity, define environment variables:

1. Create a Notifications Topic

Capture the topic OCID:

2. Create a Subscription (e.g., Email)

Check your email and confirm the subscription. No notifications will be sent until it’s confirmed.

3. Create an Events Rule for Route Table Changes

OCI route table events are emitted by the Virtual Network service with event types such as:
  • com.oraclecloud.virtualnetwork.updateRouteTable
  • com.oraclecloud.virtualnetwork.createRouteTable
  • com.oraclecloud.virtualnetwork.deleteRouteTable
(Names may vary slightly by region/tenancy version; we’ll match with a prefix.)Create a rule condition JSON file, e.g. rt-change-condition.json:
If you want to scope to only one compartment, wrap it like:

3.1 Create the Events Rule

Verify:

4. Test the Alarm

  1. Modify a route table in the target compartment (add/remove a route) using Console or CLI.
  2. Wait up to a few minutes.
  3. You should receive an email from the Notifications topic with details of the change.

5. (Optional) Harden Scope

If you only want alarms for a specific VCN or route table, refine the condition JSON:Example scoped to one route table:
Update the rule:

This setup fulfills “Route Table Change Alarm” using OCI-native monitoring/alerting primitives (Events + Notifications) via OCI CLI.
Below are the concrete steps and a Python example using the OCI SDK to configure an alarm for route table changes with OCI Monitoring.
Assumption:
Route table changes are being pushed as a custom metric (e.g., route_table_changes) into the Monitoring service (namespace oci_vcn or your own). If not, you must first create a Service Connector or other mechanism to publish these metrics.

1. Prerequisites

  1. Python SDK installed
  2. OCI config file at ~/.oci/config with a profile, e.g. [DEFAULT].
  3. OCID values you need:
    • compartment_id — Compartment where the route tables live and where metric is emitted.
    • topic_id — OCI Notifications topic OCID for sending alerts (email, Slack, etc.).
    • display_name — Name for the alarm (e.g., RouteTableChangeAlarm).

2. Metric Query for Route Table Changes

Assuming your custom metric:
  • Namespace: oci_vcn (or your custom namespace)
  • Metric name: route_table_changes
  • Dimension: routeTableId
Example query (change to your real namespace/metric):
This triggers if at least one change is observed in the past minute.

3. Python Code to Create the Alarm


4. Quick Checklist

  1. Ensure a mechanism sends a metric each time a route table is modified:
    • Metric name (e.g. route_table_changes)
    • Namespace (e.g. oci_vcn or custom/rt_changes)
  2. Confirm the metric exists in Monitoring → Metrics Explorer using your query.
  3. Run the Python script to create the alarm.
  4. Test: perform a route table change and verify a notification is sent.
If you share your exact metric namespace/name/dimensions, I can adjust the query and code precisely.