A security group acts as a virtual firewall for servers and other resources on a network. It is a container for security group rules which specify the network access rules.
Compute v2, Network v2
Create a new security group
os security group create
[--description <description>]
[--project <project> [--project-domain <project-domain>]]
<name>
Security group description
Owner’s project (name or ID)
Network version 2 only
Domain the project belongs to (name or ID). This can be used in case collisions between project names exist.
Network version 2 only
New security group name
Delete security group(s)
os security group delete
<group> [<group> ...]
Security group(s) to delete (name or ID)
List security groups
os security group list
[--all-projects]
Display information from all projects (admin only)
Network version 2 ignores this option and will always display information for all projects (admin only).
Set security group properties
os security group set
[--name <new-name>]
[--description <description>]
<group>
New security group name
New security group description
Security group to modify (name or ID)
Display security group details
os security group show
<group>
Security group to display (name or ID)