Quantcast
Viewing all articles
Browse latest Browse all 6513

NSG Security Rules, adding multiple IP's

Hi,

Is there a way to group NSG Rules? I would like to have one group that has a range of ports. Have tried adding as below to create one rule where the DestinationPortRange"2059,3181" but doesnt work.

 Get-AzureNetworkSecurityGroup-Name$NSGName|Set-AzureNetworkSecurityRule-Name"Allow DMZ  RT" -TypeInbound-Priority102-ActionAllow-SourceAddressPrefix'*'  -SourcePortRange'*'-DestinationAddressPrefix'*'-DestinationPortRange"2059"-ProtocolTCP 

 Get-AzureNetworkSecurityGroup -Name $NSGName | Set-AzureNetworkSecurityRule -Name "Allow DMZ  RT" -Type Inbound -Priority 102 -Action Allow -SourceAddressPrefix '*'  -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange"3181" -Protocol TCP 

When I try and do it I get the below:

 Set-AzureNetworkSecurityRule : BadRequest: The Destination Port provided is outside of allowed range.



Viewing all articles
Browse latest Browse all 6513

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>