Advertisement
Javi

Azure: Application Security Group example

Nov 11th, 2019
578
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. az network vnet create \
  2. -g $RG_NAME \
  3. --name $PREFIX-vnet \
  4. --address-prefix 10.0.0.0/16 \
  5. --subnet-name $PREFIX-subnet-public \
  6. --subnet-prefix 10.0.0.0/24
  7. az network asg create --name $PREFIX-pokemon-asg --location westeurope --resource-group $RG_NAME
  8. az network nsg create --name $PREFIX-pokemon-nsg --location westeurope --resource-group $RG_NAME
  9. az network nsg rule create \
  10. --resource-group $RG_NAME \
  11. --name $PREFIX-pokemon-nsg-web \
  12. --nsg-name $PREFIX-pokemon-nsg \
  13. --priority 200 \
  14. --access Allow \
  15. --destination-asgs $PREFIX-pokemon-asg \
  16. --source-address-prefixes Internet \
  17. --destination-port-ranges 80 8080 \
  18. --protocol Tcp \
  19. --destination-asgs $PREFIX-pokemon-asg \
  20. --description "Allow traffic from internet to pokemon app"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement