Skip to content

Instantly share code, notes, and snippets.

@terrancesnyder
Created October 25, 2016 17:41
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 terrancesnyder/dec801ce2226f7340c95151782cad85b to your computer and use it in GitHub Desktop.
Save terrancesnyder/dec801ce2226f7340c95151782cad85b to your computer and use it in GitHub Desktop.
network security groups azure.sh
root@dndubuntu1204:/home/azureuser/azure-xplat-cli-azure-dev# node bin/azure network nsg rule set armrestestgrp2n nsg2n nsgrule2n -d 'Allow incoming traffic from proxy22' -p 'Tcp' -f '15.203.169.110/16' -o '*' -e 'VirtualNetwork' -u '7000-7500' -c Allow -r Outbound
info: Executing command network nsg rule set
+ Looking up the network security group "nsg2n"
+ Setting a network security rule "nsgrule2n"
+ Looking up the network security group "nsg2n"
data: Id : /subscriptions/bfb5e0bf-124b-4d0c-9352-7c0a9f4d9948/resourceGroups/armrestestgrp2n/providers/Microsoft.Network/networkSecurityGroups/nsg2n/securityRules/nsgrule2n
data: Name : nsgrule2n
data: Type : Microsoft.Network/networkSecurityGroups/securityRules
data: Provisioning state : Succeeded
data: Description : Allow incoming traffic from proxy22
data: Source IP : 15.203.169.110/16
data: Source Port : *
data: Destination IP : VirtualNetwork
data: Destination Port : 7000-7500
data: Protocol : Tcp
data: Direction : Outbound
data: Access : Allow
data: Priority : 100
info: network nsg rule set command OK
root@dndubuntu1204:/home/azureuser/azure-xplat-cli-azure-dev# node bin/azure network nsg rule set armrestestgrp2n nsg2n nsgrule2n -d 'Allow incoming traffic from proxy22' -p 'Tcp' -f '15.203.169.110/16' -o 10000-10500 -e 'VirtualNetwork' -u '7000-7500' -c Allow -r Outbound
info: Executing command network nsg rule set
+ Looking up the network security group "nsg2n"
+ Setting a network security rule "nsgrule2n"
+ Looking up the network security group "nsg2n"
data: Id : /subscriptions/bfb5e0bf-124b-4d0c-9352-7c0a9f4d9948/resourceGroups/armrestestgrp2n/providers/Microsoft.Network/networkSecurityGroups/nsg2n/securityRules/nsgrule2n
data: Name : nsgrule2n
data: Type : Microsoft.Network/networkSecurityGroups/securityRules
data: Provisioning state : Succeeded
data: Description : Allow incoming traffic from proxy22
data: Source IP : 15.203.169.110/16
data: Source Port : 10000-10500
data: Destination IP : VirtualNetwork
data: Destination Port : 7000-7500
data: Protocol : Tcp
data: Direction : Outbound
data: Access : Allow
data: Priority : 100
info: network nsg rule set command OK
root@dndubuntu1204:/home/azureuser/azure-xplat-cli-azure-dev# node bin/azure network nsg rule set armrestestgrp2n nsg2n nsgrule2n -d 'Allow incoming traffic from proxy22' -p 'Tcp' -f '15.203.169.110/16' -o 10000-10500 -e 'VirtualNetwork' -u '*' -c Allow -r Outbound
info: Executing command network nsg rule set
+ Looking up the network security group "nsg2n"
+ Setting a network security rule "nsgrule2n"
+ Looking up the network security group "nsg2n"
data: Id : /subscriptions/bfb5e0bf-124b-4d0c-9352-7c0a9f4d9948/resourceGroups/armrestestgrp2n/providers/Microsoft.Network/networkSecurityGroups/nsg2n/securityRules/nsgrule2n
data: Name : nsgrule2n
data: Type : Microsoft.Network/networkSecurityGroups/securityRules
data: Provisioning state : Succeeded
data: Description : Allow incoming traffic from proxy22
data: Source IP : 15.203.169.110/16
data: Source Port : 10000-10500
data: Destination IP : VirtualNetwork
data: Destination Port : *
data: Protocol : Tcp
data: Direction : Outbound
data: Access : Allow
data: Priority : 100
info: network nsg rule set command OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment