Managing Security Rules for an NSG

Add, edit, or remove security rules for a network security group (NSG) in a virtual cloud network (VCN).

After an NSG is created, you can add or remove security rules to allow the types of ingress and egress traffic that the VNICs in the group require.

As mentioned in Overview of Network Security Groups, you can specify an NSG as the source (for ingress rules) or destination (for egress rules) in a given NSG's security rule. The two NSGs must be in the same VCN. For example, if both NSG1 and NSG2 belong to the same VCN, you could add an ingress rule to NSG1 that lists NSG2 as the source. If someone deletes NSG2, the rule becomes invalid. The REST API uses an isValid Boolean in the SecurityRule object to convey that status.

When you manage an NSG's VNIC membership, you do it as part of working with the parent resource, not the NSG itself. For more information, see Comparison of Security Lists and Network Security Groups.

Was this article helpful?