29.12. 防火墙规则创建
创建新的防火墙规则
使用方法:
openstack firewall group rule create [-h]
[-f {json,shell,table,value,yaml}]
[-c COLUMN]
[--max-width <integer>]
[--fit-width] [--print-empty]
[--noindent] [--prefix PREFIX]
[--name <name>]
[--description <description>]
[--protocol {tcp,udp,icmp,any}]
[--action {allow,deny,reject}]
[--ip-version <ip-version>]
[--source-ip-address <source-ip-address> | --no-source-ip-address]
[--destination-ip-address <destination-ip-address> | --no-destination-ip-address]
[--source-port <source-port> | --no-source-port]
[--destination-port <destination-port> | --no-destination-port]
[--public | --private | --share | --no-share]
[--enable-rule | --disable-rule]
[--project <project>]
[--project-domain <project-domain>]
| 值 | 概述 |
|---|---|
| --print-empty | 如果没有要显示数据,则打印空表。 |
| --max-width <integer> | 最大显示宽度 <1 来禁用。您还可以使用 CLIFF_MAX_TERM_WIDTH 环境变量,但参数具有优先权。 |
| --fit-width | 适合显示宽度的表。如果 --max-width 大于 0,则意味着。将环境变量 CLIFF_FIT_WIDTH=1 设置为 always 启用 |
| 值 | 概述 |
|---|---|
| output formatter options-f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml} | 输出格式,默认为 table |
| -c COLUMN, --column COLUMN | 指定要包含的列,可以重复 |
| 值 | 概述 |
|---|---|
| --noindent | 是否禁用缩进 json |
| 值 | 概述 |
|---|---|
| --destination-port <destination-port> | 目标端口号或范围(整数为 [1, 65535] 或范围,如 123:456) |
| --no-destination-ip-address | 分离目的地 IP 地址 |
| --source-ip-address <source-ip-address> | 源 IP 地址或子网 |
| --share | 共享要在所有项目中使用的防火墙规则(默认情况下,限制当前项目使用)。 |
| --no-source-ip-address | 分离源 IP 地址 |
| --private | 限制将防火墙规则限制到当前项目。此选项已弃用,并将在 R 发行版本中删除。 |
| --enable-rule | 启用此规则(默认启用) |
| --name <name> | 防火墙规则的名称 |
| --no-source-port | 分离源端口号或范围 |
| --destination-ip-address <destination-ip-address> | 目标 IP 地址或子网 |
| -h, --help | 显示帮助信息并退出 |
| --description <description> | 防火墙规则的描述 |
| --project-domain <project-domain> | 项目所属的域(名称或 id)。这可在项目名称之间有冲突时使用。 |
| --action {allow,deny,reject} | 防火墙规则的操作 |
| --ip-version <ip-version> | 设置 ip 版本 4 或 6 (默认为 4) |
| --source-port <source-port> | 源端口号或范围(整数为 [1, 65535] 或范围,如 123:456) |
| --no-share | 限制对当前项目的防火墙规则的使用 |
| --no-destination-port | 分离目标端口号或范围 |
| --project <project> | 所有者的项目(名称或 id) |
| --disable-rule | 禁用这个规则 |
| --public | 将防火墙策略设为公共,允许它在所有项目中使用(而不是默认值),这是限制其对当前项目的使用。这个选项已弃用,并将在 R Release 中删除 |
| --protocol {tcp,udp,icmp,any} | 防火墙规则的协议 |
| 值 | 概述 |
|---|---|
| 格式化 UNIX shell 可以解析(variable="value")--prefix PREFIX | 为所有变量名称添加前缀 |