Skip to content

Include Azure CLI script for NSG rules setup#128612

Open
hisriram1996 wants to merge 1 commit into
MicrosoftDocs:mainfrom
hisriram1996:patch-10
Open

Include Azure CLI script for NSG rules setup#128612
hisriram1996 wants to merge 1 commit into
MicrosoftDocs:mainfrom
hisriram1996:patch-10

Conversation

@hisriram1996

Copy link
Copy Markdown
Contributor

Added Azure CLI instructions for creating NSG rules for Azure Bastion.

Added Azure CLI instructions for creating NSG rules for Azure Bastion.
@prmerger-automator

Copy link
Copy Markdown
Contributor

@hisriram1996 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

1 similar comment
@prmerger-automator

Copy link
Copy Markdown
Contributor

@hisriram1996 : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit cfee96c:

✅ Validation status: passed

File Status Preview URL Details
articles/bastion/bastion-nsg.md ✅Succeeded

For more details, please refer to the build report.

@Court72 Court72 requested a review from Copilot July 6, 2026 14:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +209 to +213
# 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
Comment on lines +211 to +215
# 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"
@Court72

Court72 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

@asudbring

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged tracking label for the PR review team label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants