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

Configuring the security group rules using CLI


In the previous section, we saw the creation of a security group using the Neutron CLI. In this recipe, we will see how to create the security group rules using the Neutron 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 of the security group, protocol, direction of the traffic flow, protocol port, and a remote CIDR network

How to do it…

The following steps will show you how to create a security group rule 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. To create a security group rule, use neutron security-group-rule-create, as follows:

The Neutron CLI commands can also be used to list, view...