Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Merlus
Last active November 15, 2017 02:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Merlus/f8d881ee5c6ff517dcd8dec075729296 to your computer and use it in GitHub Desktop.
Save Merlus/f8d881ee5c6ff517dcd8dec075729296 to your computer and use it in GitHub Desktop.
ASG - Create Security Rules
$webRule = New-AzureRmNetworkSecurityRuleConfig `
-Name "AllowHttps" `
-Access Allow `
-Protocol Tcp `
-Direction outbound `
-Priority 1500 `
-SourceApplicationSecurityGroupId $webAsg.id `
-SourcePortRange * `
-DestinationAddressPrefix VirtualNetwork `
-DestinationPortRange 443
$sqlRule = New-AzureRmNetworkSecurityRuleConfig `
-Name "AllowSql" `
-Access Allow `
-Protocol Tcp `
-Direction outbound `
-Priority 1000 `
-SourceApplicationSecurityGroupId $sqlAsg.id `
-SourcePortRange * `
-DestinationAddressPrefix VirtualNetwork `
-DestinationPortRange 1433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment