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.
- Open the navigation menu, click Networking, and then click Virtual cloud networks.
- Click the name of the VCN you're interested in.
- Under Resources, click NAT Gateways.
- For the NAT gateway you're interested in, click the , and then click Block Traffic (or Allow Traffic if you've previously blocked traffic).
- 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 nat-gateway update command and required parameters to block (true) or allow (false) traffic for a NAT gateway:
oci network nat-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.