Skip to content

Instantly share code, notes, and snippets.

@gregjhogan
Created September 25, 2015 22:08
Show Gist options
  • Select an option

  • Save gregjhogan/dcc71d68deb7dd8785da to your computer and use it in GitHub Desktop.

Select an option

Save gregjhogan/dcc71d68deb7dd8785da to your computer and use it in GitHub Desktop.
Azure create NSG allowing SSH and RDP
azure network nsg create --resource-group <resource-group> --location <location> <nsg-name>
azure network nsg rule create --access Allow --protocol Tcp --direction Inbound --priority 100 --source-address-prefix Internet --source-port-range * --destination-address-prefix * --destination-port-range 3389 <resource-group> <nsg-name> allow-rdp
azure network nsg rule create --access Allow --protocol Tcp --direction Inbound --priority 100 --source-address-prefix Internet --source-port-range * --destination-address-prefix * --destination-port-range 22 <resource-group> <nsg-name> allow-ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment