Controlling Traffic for a Service Gateway
You can block or allow traffic for a service gateway in a virtual cloud network (VCN).
You create a service gateway in the context of a specific VCN. That is, the service gateway is always attached to that one VCN. However, you can block or allow traffic through the service gateway at any time. By default, the gateway allows traffic flow upon creation. Blocking the service gateway traffic prevents all traffic from flowing, regardless of what service CIDR labels are enabled, or any existing route rules or security rules in the VCN.
When the traffic is blocked, the service gateway's icon turns gray, and the State label changes to Blocked. When the traffic is allowed, the service gateway's icon turns green, and the State label changes to Available. Use the network service-gateway update command and required parameters to block or allow traffic for a service gateway:
oci network service-gateway update --service-gateway-id sgw-ocid --block-traffic [true|false] ... [OPTIONS]
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Run the UpdateServiceGateway operation to block or allow traffic for a service gateway, using the
blockTraffic
attribute.