Blocking or Allowing Traffic for a NAT Gateway

Block or allow traffic for a NAT gateway.

You create a NAT gateway in the context of a specific VCN. In other words, the NAT gateway is automatically always attached to only one VCN of your choice. However, you can block or allow traffic through the NAT gateway at any time. By default, the gateway allows traffic upon creation. Blocking the NAT gateway prevents all traffic from flowing, regardless of any existing route rules or security rules in your VCN.

    1. Open the navigation menu, click Networking, and then click Virtual cloud networks.
    2. Click the name of the VCN you're interested in.
    3. Under Resources, click NAT Gateways.
    4. For the NAT gateway you're interested in, click the Actions menu (Actions Menu), and then click Block Traffic (or Allow Traffic if you've previously blocked traffic).
    5. Click Block Traffic (or Allow Traffic if you've previously blocked traffic) to confirm.

    When the traffic is blocked, the NAT gateway's icon turns gray, and the label changes to BLOCKED. When the traffic is allowed, the NAT gateway's icon turns green, and the label changes to AVAILABLE.

  • Use the network internet-gateway update command and required parameters to block (true) or allow (false) traffic for a NAT gateway:

    oci network internet-gateway update --nat-gateway-id nat-ocid --block-traffic [true | false] ... [OPTIONS]

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Run the UpdateNatGateway operation to block or allow traffic for a NAT gateway.