尝试添加NSG规则时,出现以下错误:
Get-AzNetworkSecurityGroup -ResourceGroupName MYRG -Name MYNSG | Add-AzNetworkSecurityRuleConfig -Name AllowSyslog-Outbound -Access Allow -Protocol * -Direction Outbound -Priority 3001 -SourceAddressPrefix 10.200.32.36 -SourcePortRange * -DestinationAddressPrefix "10.201.0.5,10.201.2.4" -DestinationPortRange (514, 6514) | Set-AzNetworkSecurityGroup
字符串
抛出错误:
Set-AzNetworkSecurityGroup: Security rule /subscriptions/XXX/resourceGroups/MYRG/providers/Microsoft.Network/networkSecurityGroups/MYNSG/securityRules/AllowSyslog-Outbound has invalid Address prefix. Value provided: 10.201.0.5,10.201.2.4
StatusCode: 400
ReasonPhrase: Bad Request
ErrorCode: SecurityRuleInvalidAddressPrefix
型
1条答案
按热度按时间zhte4eai1#
在
Add-AzNetworkSecurityRuleConfig
中使用多个IP地址的正确格式如下:字符串