17.3. 添加允许的地址对
您可以将允许的地址对添加到端口,以启用网络流量通过端口流,而不考虑子网。
重要
不要在允许的地址对中使用更广泛的 IP 地址范围的默认安全组。这样做可让单个端口为同一网络中的所有其他端口绕过安全组。
流程
使用以下命令添加允许的地址对:
openstack port set --allowed-address mac-address=<mac_address>,ip-address=<ip_cidr> <port>
$ openstack port set --allowed-address mac-address=<mac_address>,ip-address=<ip_cidr> <port>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意您不能设置与端口的
mac_address
和ip_address
匹配的 allowed-address 对。这是因为此类设置没有作用,因为与mac_address
和ip_address
匹配的流量已经被允许通过端口。