Skip to content

Commit 705f332

Browse files
committed
bastion-nsg: reorganize into Portal and PowerShell tabs
1 parent 127de17 commit 705f332

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

articles/bastion/bastion-nsg.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.service: azure-bastion
66
ms.topic: concept-article
77
ms.date: 02/24/2026
88
ms.author: abell
9-
# Customer intent: As a member of the SecOps team, I want to understand and configure network security groups for Azure Bastion, so that I can manage secure ingress and egress traffic to virtual machines while maintaining compliance and security practices. I want to understand the impact of not having the correct NSG rules in place from a security perspective.
9+
# Customer intent: As a network administrator, I want to understand and configure network security groups for Azure Bastion, so that I can manage secure ingress and egress traffic to virtual machines while maintaining compliance and security practices. I want to understand the impact of not having the correct NSG rules in place from a security perspective. This is a procedural article.
1010
---
1111
# Configure NSG rules for Azure Bastion
1212

@@ -24,14 +24,14 @@ In this diagram:
2424
* Connect Integration - Single-click RDP/SSH session inside the browser
2525
* No public IP is required on the Azure VM.
2626

27-
## <a name="nsg"></a>Network security groups
27+
## <a name="nsg"></a>Setting up network security groups (NSG)
2828

2929
This section shows you the network traffic between the user and Azure Bastion, and through to target VMs in your virtual network:
3030

3131
> [!IMPORTANT]
3232
> If you apply an NSG to your Azure Bastion resource, you **must** create all of the following ingress and egress traffic rules. Omitting any rule blocks your Bastion host from receiving platform updates and opens your deployment to future security vulnerabilities.
3333
34-
The following table summarizes all required NSG rules. Detailed explanations for each rule follow.
34+
The following table summarizes all required NSG rules.
3535

3636
| Rule name | Direction | Source | Destination | Port(s) | Protocol |
3737
|---|---|---|---|---|---|
@@ -44,6 +44,8 @@ The following table summarizes all required NSG rules. Detailed explanations for
4444
| AllowBastionCommunication | Outbound | VirtualNetwork | VirtualNetwork | 8080, 5701 | * |
4545
| AllowHttpOutbound | Outbound | * | Internet | 80 | * |
4646

47+
### [Portal](#tab/portal)
48+
4749
### <a name="apply"></a>AzureBastionSubnet
4850

4951
Azure Bastion is deployed specifically to ***AzureBastionSubnet***.
@@ -74,8 +76,11 @@ This is the subnet that contains the target virtual machine that you want to con
7476

7577
* **Ingress from AzureBastionSubnet (ports 3389, 22):** Open RDP/SSH ports (3389 and 22 respectively, or custom values if you use the custom port feature with Standard or Premium SKU) inbound on the target VM subnet over private IP. Without this rule, Bastion can't reach your VMs even when it's correctly configured. As a best practice, scope the source to the AzureBastionSubnet IP address range so that only Bastion can open these ports -- not the broader internet.
7678

77-
### PowerShell script to create NSG rules
78-
```
79+
### [PowerShell](#tab/powershell)
80+
81+
Use the following script to create all required NSG rules for Azure Bastion.
82+
83+
```azurepowershell
7984
# Connect to Azure Account
8085
Connect-AzAccount
8186
# Get the Network Security Group details
@@ -189,6 +194,8 @@ foreach ($rule in $rules) {
189194
}
190195
```
191196

197+
---
198+
192199
## Next steps
193200

194201
* Learn how to [secure your Azure Bastion deployment](secure-bastion.md) using actionable guidance aligned to the Microsoft Cloud Security Benchmark.

0 commit comments

Comments
 (0)