Include Azure CLI script for NSG rules setup#128612
Conversation
Added Azure CLI instructions for creating NSG rules for Azure Bastion.
|
@hisriram1996 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
1 similar comment
|
@hisriram1996 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change. |
|
Learn Build status updates of commit cfee96c: ✅ Validation status: passed
For more details, please refer to the build report. |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds an Azure CLI tab with a script to create the Network Security Group (NSG) rules required for Azure Bastion.
Changes:
- Adds an Azure CLI section under the existing instructions.
- Provides a single copy/paste script to create an NSG and all required inbound/outbound rules.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Connect to Azure Account | ||
| az login | ||
| # Get the Network Security Group details | ||
| read -p "Enter the name of the Resource Group: " resourceGroupName | ||
| read -p "Enter the name of the Network Security Group: " nsgName |
| # Get the Network Security Group details | ||
| read -p "Enter the name of the Resource Group: " resourceGroupName | ||
| read -p "Enter the name of the Network Security Group: " nsgName | ||
| # Create the Network Security Group | ||
| az network nsg create --resource-group $resourceGroupName --name $nsgName |
| # Create the Network Security Group | ||
| az network nsg create --resource-group $resourceGroupName --name $nsgName | ||
| # Ingress and Egress rules in the Network Security Group | ||
| az network nsg rule create --name "AllowHttpsInbound" --nsg-name $nsgName --resource-group $resourceGroupName --priority 120 --direction "Inbound" --access "Allow" --source-address-prefixes "Internet" --source-port-ranges "*" --destination-address-prefixes "*" --destination-port-ranges "443" --protocol "Tcp" |
| az network nsg rule create --name "AllowSshRdpOutbound" --nsg-name $nsgName --resource-group $resourceGroupName --priority 100 --direction "Outbound" --access "Allow" --source-address-prefixes "*" --source-port-ranges "*" --destination-address-prefixes "VirtualNetwork" --destination-port-ranges 22 3389 --protocol "Tcp" | ||
| az network nsg rule create --name "AllowAzureCloudOutbound" --nsg-name $nsgName --resource-group $resourceGroupName --priority 110 --direction "Outbound" --access "Allow" --source-address-prefixes "*" --source-port-ranges "*" --destination-address-prefixes "AzureCloud" --destination-port-ranges "443" --protocol "Tcp" | ||
| az network nsg rule create --name "AllowBastionCommunication" --nsg-name $nsgName --resource-group $resourceGroupName --priority 120 --direction "Outbound" --access "Allow" --source-address-prefixes "VirtualNetwork" --source-port-ranges "*" --destination-address-prefixes "VirtualNetwork" --destination-port-ranges 8080 5701 --protocol "Tcp" | ||
| az network nsg rule create --name "AllowHttpOutbound" --nsg-name $nsgName --resource-group $resourceGroupName --priority 130 --direction "Outbound" --access "Allow" --source-address-prefixes "*" --source-port-ranges "*" --destination-address-prefixes "Internet" --destination-port-ranges "80" --protocol "Tcp" |
|
Can you review the proposed changes? Important: When the changes are ready for publication, adding a #label:"aq-pr-triaged" |
Added Azure CLI instructions for creating NSG rules for Azure Bastion.