List Rules in Security Group Using CLI

Problem

  • Need to view the rules present in a Security Group like open ports, CIDR block, and protocol.

Environment

  • Platform9 Managed OpenStack - All Versions

Procedure

  • To view the rules in a Security Group, run:

$ openstack security group rule list --long [security group UUID]
  • Output:

openstack security group rule list --long e27b4877-f2a0-42bb-ae50-8ab04f222c89
    +--------------------------------------+-------------+-----------+------------+-----------+-----------+-----------------------+
    | ID                                   | IP Protocol | IP Range  | Port Range | Direction | Ethertype | Remote Security Group |
    +--------------------------------------+-------------+-----------+------------+-----------+-----------+-----------------------+
    | 10f1df0a-098a-497c-b3b2-fbe46c676f5c | None        | 0.0.0.0/0 |            | egress    | IPv4      | None                  |
    | 74b91e24-d491-4f10-a847-94d069f9529b | None        | 0.0.0.0/0 |            | ingress   | IPv4      | None                  |
    | e81b2d9f-210c-4914-88ee-9e61441ea486 | tcp         | 0.0.0.0/0 | 22:22      | ingress   | IPv4      | None                  |
    +--------------------------------------+-------------+-----------+------------+-----------+-----------+-----------------------+

Additional Information

OpenStack Docs: Security Group Rulearrow-up-right

Last updated