Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

Azure networking - Configure a Virtual Network Service Endpoint

Great list, Rajesh! To build a strong foundation in Azure networking and security, it’s best to learn these topics in a logical progression — starting from basics, moving into connectivity, then security, and finally advanced services. Here’s the order I recommend:


🧩 Step 1: Core Networking Basics

  1. Configure a Virtual Network Service Endpoint
  2. Configure an Azure VNet‑to‑VNet Connection
  3. Configure Virtual Network Connectivity by Using Peering
  4. Configure Global Virtual Network Peering
  5. Configure Route Tables in a Virtual Network
  6. Implement Name Resolution in Azure

🔒 Step 2: Network Security Fundamentals

  1. Configure Multi‑Scope Network Security
  2. Configure and Control Network Traffic
  3. Configure a Network Security Group in a Virtual Network
  4. Configure an Application Security Group
  5. Implement Network Security Groups and Application Security Groups
  6. Configure an Azure Lock (resource protection)

💻 Step 3: Secure Virtual Machines

  1. Can You Implement a Secure Azure Virtual Machine Network?
  2. Protect an Azure Virtual Machine That Runs Windows Server 2019 by Using Azure Security Groups

🌐 Step 4: Load Balancing & Traffic Management

  1. Configure an Azure Load Balancer
  2. Implement an Azure Load Balancer in Azure
  3. Implement an Azure Application Gateway
  4. Implement Azure Front Door

🔥 Step 5: Advanced Security & Connectivity

  1. Implement a Private Endpoint in Azure
  2. Implement a Service Endpoint in Azure
  3. Implement an Azure Firewall
  4. Implement an Azure ExpressRoute Circuit
  5. Implement an Azure Virtual WAN

🚀 Suggested Learning Path

  • Start with Virtual Networks & Peering → understand how Azure networks connect.
  • Move to Security Groups → learn how to control traffic.
  • Secure VMs → apply those concepts to workloads.
  • Load Balancers & Gateways → manage traffic distribution.
  • Advanced Services → firewall, ExpressRoute, Virtual WAN for enterprise-scale networking.

👉 This order ensures you first master fundamentals, then layer on security, and finally explore advanced enterprise features.

Would you like me to also map these into hands-on labs (with Azure CLI/Portal steps) so you can practice each topic in sequence?






Create a key vault 

raj@DESKTOP-E7NBI4Q:~$ az account set --subscription 294c1bcb-1d87-48bf-a7a4-4155b630fec4
raj@DESKTOP-E7NBI4Q:~$ az keyvault secret set \
  --vault-name mykeyvault62890584 \
  --name challenge-secret \
  --value mykvstring
{
  "attributes": {
    "created": "2026-06-22T18:12:23+00:00",
    "enabled": true,
    "expires": null,
    "notBefore": null,
    "recoverableDays": 90,
    "recoveryLevel": "Recoverable+Purgeable",
    "updated": "2026-06-22T18:12:23+00:00"
  },
  "contentType": null,
  "id": "https://mykeyvault62890584.vault.azure.net/secrets/challenge-secret/1d6dd0c12f0249688c5c4cfa0ae779c7",
  "kid": null,
  "managed": null,
  "name": "challenge-secret",
  "tags": {
    "file-encoding": "utf-8"
  },
  "value": "mykvstring"
}
raj@DESKTOP-E7NBI4Q:~$ az keyvault secret show \
  --vault-name mykeyvault62890584 \
  --name challenge-secret
{
  "attributes": {
    "created": "2026-06-22T18:12:23+00:00",
    "enabled": true,
    "expires": null,
    "notBefore": null,
    "recoverableDays": 90,
    "recoveryLevel": "Recoverable+Purgeable",
    "updated": "2026-06-22T18:12:23+00:00"
  },
  "contentType": null,
  "id": "https://mykeyvault62890584.vault.azure.net/secrets/challenge-secret/1d6dd0c12f0249688c5c4cfa0ae779c7",
  "kid": null,
  "managed": null,
  "name": "challenge-secret",
  "tags": {
    "file-encoding": "utf-8"
  },
  "value": "mykvstring"
}

======================Step 2======================================


## 🔍 Step 1: Verify Service Endpoint on Subnet
Run this command to check if the **Microsoft.KeyVault** service endpoint is enabled on your backend subnet:

```bash
az network vnet subnet show \
  --resource-group myResourceGroup \
  --vnet-name myVnet \
  --name backendSubnet \
  --query serviceEndpoints


```

- Look for an entry like:

  ```json
  [
    {
      "service": "Microsoft.KeyVault",
      "provisioningState": "Succeeded"
    }
  ]
  ```
- The `provisioningState` should display **Succeeded**.

---

## 🔒 Step 2: Create Outbound NSG Rule
Add the outbound security rule to the **webapp-nsg**:

```bash
az network nsg rule create \
  --resource-group myResourceGroup \
  --nsg-name webapp-nsg \
  --name AllowKeyVault \
  --priority 100 \
  --direction Outbound \
  --access Allow \
  --protocol Tcp \
  --source-address-prefixes VirtualNetwork \
  --destination-address-prefixes AzureKeyVault \
  --destination-port-ranges '*'
```


---

## ✅ Step 3: Verify NSG Rule
List the rules in your NSG to confirm:

```bash
az network nsg rule list \
  --resource-group myResourceGroup \
  --nsg-name webapp-nsg \
  --output table
```


You should see a rule named **AllowKeyVault** with:
- **Source** = VirtualNetwork  
- **Destination** = AzureKeyVault  
- **Direction** = Outbound  
- **Priority** = 100  
- **Access** = Allow  

---
=====================Step 3===================================

Thanks for sharing the output, Rajesh — now we know your VNet is named VNET (not myVnet) and it already has 2 subnets. That’s why your earlier commands failed: the resource name didn’t match.

Here’s how you can fix it:


🔒 Step 1: Enable Service Endpoint on Backend Subnet

Replace myVnet with the actual VNet name VNET:

az network vnet subnet update \
  --resource-group RG1 \
  --vnet-name VNET \
  --name backendSubnet \
  --service-endpoints Microsoft.KeyVault

(If your subnet isn’t literally named backendSubnet, run az network vnet subnet list --resource-group RG1 --vnet-name VNET --output table to see the exact subnet names, then use the correct one.)


🔑 Step 2: Restrict Key Vault Access

Now add the network rule to your Key Vault:

az keyvault network-rule add \
  --resource-group RG1 \
  --name mykeyvault62890584 \
  --vnet-name VNET \
  --subnet backendSubnet

✅ Step 3: Verify

Check that the service endpoint is enabled and succeeded:

az network vnet subnet show \
  --resource-group RG1 \
  --vnet-name VNET \
  --name backendSubnet \
  --query serviceEndpoints

Expected output:

[
  {
    "service": "Microsoft.KeyVault",
    "provisioningState": "Succeeded"
  }
]

=============Stpe 4===========================

Here’s how you complete the service endpoint verification activity with Azure CLI:


🔍 Step 1: Get VM2’s Public IP

Run this command in Cloud Shell:

az vm list-ip-addresses \
  --resource-group RG1 \
  --name VM2 \
  --output table
  • Copy the Public IP Address shown for VM2 into the challenge text box.

🔐 Step 2: SSH into VM2

Use the public IP you just copied:

ssh azureadmin@<VM2_Public_IP>
  • When prompted, enter the password:
    AzurePassw0rd!
    

🛠 Step 3: Install Azure CLI on VM2

Inside VM2, run:

curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash

This installs the Azure CLI on the Linux VM.


🔑 Step 4: Sign in with TAP

Run:

az login --use-device-code
  • Enter your username: Admin-62890584@LODSPRODMCA.onmicrosoft.com
  • Use the TAP: Q%tuNf&K
  • Complete the login in the browser/device code prompt.

✅ Step 5: Verify Secret Access

Now that VM2 is in the backend subnet (which has the Key Vault service endpoint enabled), you can access the secret:

az keyvault secret show \
  --vault-name mykeyvault62890584 \
  --name challenge-secret

📋 Step 6: Record Recovery Level

The output will look like:

{
  "id": "https://mykeyvault62890584.vault.azure.net/secrets/challenge-secret/...",
  "name": "challenge-secret",
  "value": "mykvstring",
  "attributes": {
    "enabled": true,
    "recoveryLevel": "CustomizedRecoverable+Purgeable",
    "created": "2026-06-22T18:45:00+00:00",
    "updated": "2026-06-22T18:45:00+00:00"
  }
}



Post a Comment

0 Comments

Ad Code

Responsive Advertisement