Book Image

OpenStack Networking Cookbook

Book Image

OpenStack Networking Cookbook

Overview of this book

Table of Contents (19 chapters)
OpenStack Networking Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a security group using CLI


We have seen how to create a security group using Horizon; this recipe shows you how to create a security group using the CLI.

Getting ready

For this recipe, you will need the following information:

  • The SSH login credentials for a node where the Neutron client packages are installed

  • A shell RC file that initializes the environment variables for CLI

  • The name and description of the security group

How to do it…

The following steps will show you how to create a security group using the Neutron CLI:

  1. Using the appropriate credentials, SSH into the OpenStack node installed with the Neutron client packages.

  2. Source the shell RC file to initialize the environment variables required for the CLI commands.

  3. Execute the neutron security-group-create command to create a security group with the desired name and description:

  4. To list the security groups defined for the tenant, use the security-group-list command:

  5. To see the details of the security group that has been created, use the...