Resolve private endpoints with a custom DNS server
- Make stlogs01.blob.core.windows.net resolve to 10.0.3.4 from vm-spoke1
- Look the name up from vm-spoke1
The company runs its own DNS server, dns-hub at 10.0.4.4, which forwards privatelink names to Azure DNS. The privatelink zone is linked to the hub only. Point vnet-spoke1 at dns-hub and watch stlogs01 start resolving to its private endpoint.
Connect to vm-spoke1.
ssh vm-spoke1What's this?
Opens a shell on vm-spoke1, so the next commands run on that VM. In this lab it's a shortcut. In real Azure you'd connect through something like Azure Bastion, or SSH to an address you can reach.
Look the name up with Azure DNS. The spoke isn't linked, so it's public. Type exit when done.
nslookup stlogs01.blob.core.windows.netWhat's this?
Asks the VM's DNS server what IP address a name points to. Run it on the VM that has the problem, because each VM can get a different answer.
Point the spoke at the company DNS server.
az network vnet update -g rg-lab --name vnet-spoke1 --dns-servers 10.0.4.4What's this?
Changes a virtual network, such as its address space or the DNS servers its VMs use.
-gthe resource group the resources live in--namethe name of the thing to look at or change
--dns-servers 10.0.4.4custom DNS for every VM in the VNet
Connect again.
ssh vm-spoke1What's this?
Opens a shell on vm-spoke1, so the next commands run on that VM. In this lab it's a shortcut. In real Azure you'd connect through something like Azure Bastion, or SSH to an address you can reach.
Look it up through dns-hub. Type exit when done.
nslookup stlogs01.blob.core.windows.netWhat's this?
Asks the VM's DNS server what IP address a name points to. Run it on the VM that has the problem, because each VM can get a different answer.
Answer the question below.
?
- Resource group, the outer dashed frame
- Virtual network, with its address space top right
- Subnet, with range and usable IPs (5 reserved)
- Network security group. A small shield on a VM's NIC means the NIC has one too
- Route table on the subnet
- VM Appliance Private endpoint
- Peering Connected Initiated or access off
- Goal working Goal broken, X marks where it stops
- Private DNS zone, dotted lines go to linked VNets
- Orange pulse: what your last command changed. Drag to pan, Ctrl and scroll to zoom.
vm-spoke1 → stlogs01.blob.core.windows.net:443should work: not working