Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning OpenStack Networking

You're reading from   Learning OpenStack Networking Build a solid foundation in virtual networking technologies for OpenStack-based clouds

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781788392495
Length 462 pages
Edition 3rd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
James Denton James Denton
Author Profile Icon James Denton
James Denton
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Introduction to OpenStack Networking FREE CHAPTER 2. Installing OpenStack 3. Installing Neutron 4. Virtual Network Infrastructure Using Linux Bridges 5. Building a Virtual Switching Infrastructure Using Open vSwitch 6. Building Networks with Neutron 7. Attaching Instances to Networks 8. Managing Security Groups 9. Role-Based Access Control 10. Creating Standalone Routers with Neutron 11. Router Redundancy Using VRRP 12. Distributed Virtual Routers 13. Load Balancing Traffic to Instances 14. Advanced Networking Topics 15. Other Books You May Enjoy

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> --security-group <SECURITY_GROUP> 

Multiple security groups can be associated with a port simultaneously...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image