本篇博客介绍openstack中防火墙的基本操作
在这里插入图片描述
在这里插入图片描述

这里开放所有端口来添加防火墙规则的,由于非生产环境
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

可以使用neutron基础命令进行查看

[root@controller html]# neutron --help | grep  fire
  firewall-create                   Create a firewall.
  firewall-delete                   Delete a given firewall.
  firewall-list                     List firewalls that belong to a given tenant.
  firewall-policy-create            Create a firewall policy.
  firewall-policy-delete            Delete a given firewall policy.
  firewall-policy-insert-rule       Insert a rule into a given firewall policy.
  firewall-policy-list              List firewall policies that belong to a given tenant.
  firewall-policy-remove-rule       Remove a rule from a given firewall policy.
  firewall-policy-show              Show information of a given firewall policy.
  firewall-policy-update            Update a given firewall policy.
  firewall-rule-create              Create a firewall rule.
  firewall-rule-delete              Delete a given firewall rule.
  firewall-rule-list                List firewall rules that belong to a given tenant.
  firewall-rule-show                Show information of a given firewall rule.
  firewall-rule-update              Update a given firewall rule.
  firewall-show                     Show information of a given firewall.
  firewall-update                   Update a given firewall.
[root@controller html]# neutron  


如果喜欢纯命令行的话,也可以直接使用命令行并结合帮助文档进行创建openstack的防火墙

[root@controller html]# neutron   firewall-list 
+--------------------------------------+---------------+--------------------------------------+
| id                                   | name          | firewall_policy_id                   |
+--------------------------------------+---------------+--------------------------------------+
| 4ccc9e3e-fc0b-48e7-a290-dbffe42440c8 | firewalldtest | b8f0f135-b23a-4ace-bf9e-45978671ec0a |
+--------------------------------------+---------------+--------------------------------------+
[root@controller html]# neutron   firewall-show firewalldtest 
+--------------------+--------------------------------------+
| Field              | Value                                |
+--------------------+--------------------------------------+
| admin_state_up     | True                                 |
| description        | firewalldtest                        |
| firewall_policy_id | b8f0f135-b23a-4ace-bf9e-45978671ec0a |
| id                 | 4ccc9e3e-fc0b-48e7-a290-dbffe42440c8 |
| name               | firewalldtest                        |
| router_ids         | a68d191d-85fe-4bd9-8620-10c3c6700e9d |
| status             | ACTIVE                               |
| tenant_id          | 7551518924a3446dad5827159148db8b     |
+--------------------+--------------------------------------+
[root@controller html]# neutron firewall-rule-list 
+--------------------------------------+------+--------------------------------------+----------------------+---------+
| id                                   | name | firewall_policy_id                   | summary              | enabled |
+--------------------------------------+------+--------------------------------------+----------------------+---------+
| 1cf28a03-d2c9-4fff-b5ac-280fb9cd373f | fire | b8f0f135-b23a-4ace-bf9e-45978671ec0a | TCP,                 | True    |
|                                      |      |                                      |  source: none(none), |         |
|                                      |      |                                      |  dest: none(none),   |         |
|                                      |      |                                      |  allow               |         |
+--------------------------------------+------+--------------------------------------+----------------------+---------+
[root@controller html]# neutron firewall-policy-list
+--------------------------------------+--------+----------------------------------------+
| id                                   | name   | firewall_rules                         |
+--------------------------------------+--------+----------------------------------------+
| b8f0f135-b23a-4ace-bf9e-45978671ec0a | policy | [1cf28a03-d2c9-4fff-b5ac-280fb9cd373f] |
+--------------------------------------+--------+----------------------------------------+
[root@controller html]# neutron firewall-policy-show policy
+----------------+--------------------------------------+
| Field          | Value                                |
+----------------+--------------------------------------+
| audited        | False                                |
| description    | policy                               |
| firewall_rules | 1cf28a03-d2c9-4fff-b5ac-280fb9cd373f |
| id             | b8f0f135-b23a-4ace-bf9e-45978671ec0a |
| name           | policy                               |
| shared         | False                                |
| tenant_id      | 7551518924a3446dad5827159148db8b     |
+----------------+--------------------------------------+
[root@controller html]# 

总共二十一篇关于openstack先电IAAS 基础平台搭建基础设施即服务,已经全部介绍完毕
参考文献:
先电IAAS基础平台开发

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐