Skip to Content
Learning OpenStack Networking - Third Edition
book

Learning OpenStack Networking - Third Edition

by James Denton
August 2018
Beginner
462 pages
12h 36m
English
Packt Publishing
Content preview from Learning OpenStack Networking - Third Edition

Applying security groups to instances and ports

Applying security groups to instances within the CLI is typically done at instance creation using the openstack server create command that's shown here:

openstack server create--flavor <FLAVOR_ID>--image <IMAGE_ID>--nic net-id=<NETWORK_ID>--security-group <SECURITY_GROUP_ID>INSTANCE_NAME 

Security groups can also be applied to running instances by using either the openstack port set or the openstack server add security group commands. The following examples demonstrate the use of the openstack port set command to apply security groups to a port.

In this example, the security group will be applied to the port, and the associated rules will be implemented immediately:

openstack port set <PORT> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

You might also like

OpenStack Certification, 2/e

OpenStack Certification, 2/e

Sander van Vugt
Mastering OpenStack - Second Edition

Mastering OpenStack - Second Edition

Omar Khedher, Chandan Dutta

Publisher Resources

ISBN: 9781788392495