Listing NSGs

List the network security groups (NSGs) in a Virtual Cloud Network (VCN).

    1. On the Virtual Cloud Networks list page, select the VCN that contains the NSG you want to work with. If you need help finding the list page or the VCN, see Listing VCNs.
    2. On the details page, perform one of the following actions depending on the option that you see:
      • On the Security tab, go to the Network Security Groups section.
      • Under Resources, select Network Security Groups.

      All NSGs in the VCN are displayed in a table.

  • Use the network nsg list command and required parameters to list the NSGs in a VCN:

    oci network nsg list [ --compartment-id compartment-ocid | --vlan-id vlan-ocid ]  ... [OPTIONS]

    You must specify either a --vlan-id or a --compartment-id, but can't specify both. If you specify a --vlan-id, all other parameters are ignored.

    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.

  • Run the ListNetworkSecurityGroups operation to list the NSGs in your compartment.