Changing Which Security Lists a Subnet Uses
Change which security lists are used in a particular subnet in a virtual cloud network (VCN).
- Open the navigation menu, click Networking, and then click Virtual cloud networks.
- Click the name of the VCN you're interested in.
- Click Subnets.
- Click the subnet you're interested in.
- Under Resources, click Security Lists.
- To add a security list, click Add Security List, and select the new security list you want the subnet to use.
- To remove a security list, click the to the right side of it, and then select Remove. Remember that a subnet must always have at least one security list associated with it.
The changes take effect within a few seconds.
Use the network subnet update command and described parameters to change which security list a subnet uses:
oci network subnet update --subnet-id ocid --security-list-ids securitylist-ocids ... [OPTIONS]
The security-list-ids are OCIDs of the security list or lists the subnet will use. This replaces the entire current set of security lists. Remember that security lists are associated with the subnet, but the rules are applied to the individual VNICs in the subnet. This is a complex type whose value must be valid JSON.
For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.
Run the UpdateSubnet operation to change which security lists are used in a particular subnet.