Attaching VNICs to a Network Security Group
On Compute Cloud@Customer, an NSG has one or more VNICs. You can attach a VNIC to an NSG when you create an instance or when you create or update the VNIC.
See the following procedures:
You can view NSGs and VNICs in different ways:
-
To view the list of NSGs that a VNIC is attached to, perform the following steps.
- In the Compute Cloud@Customer Console navigation menu, click Compute, then click Instances.
- At the top of the page, select the compartment that contains the instance that has the VNIC.
-
Click the name of the instance.
The instance details page is displayed.
-
Under Resources, and click Attached VNICs.
-
Click the name of the VNIC.
-
Under Resources, click Network Security Groups.
-
To view the list of VNICs that are attached to an NSG, perform the following steps.
-
In the Compute Cloud@Customer Console navigation menu, click Networking, then click Virtual Cloud Networks.
- At the top of the page, select the compartment that contains the VNC.
-
Click the name of the VCN.
The VCN details page is displayed.
-
Under Resources, click Network Security Groups.
-
In the list, click the name of the NSG.
-
Under Resources, click VNICs.
-
-
To change the list of NSGs that a VNIC is attached to, update the VNIC. See Updating a VNIC.
-
Use the oci network vnic get command and required parameters to view the list of NSGs that a VNIC is attached to.
oci network vnic get [OPTIONS]
Use the oci network nsg list command and required parameters to view the list of VNICs that are attached to an NSG.
oci network nsg vnics list [OPTIONS]
For a complete list of CLI commands, flags, and options, see the Command Line Reference.
To change the list of NSGs that a VNIC is attached to, update the VNIC.
Use the GetVnic operation to view the list of NSGs that a VNIC is attached to.
Use the ListNetworkSecurityGroupVnics operation to view the list of VNICs that are attached to an NSG.
For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.