opticyclic
opticyclic

Reputation: 8136

How Do I Resolve A Public DNS Name To An Internal IP On Azure?

I have an azure network set up with the default Azure DNS.

All the VMs are ubuntu.

When I try to access another VM on the network via the public DNS name it resolves to the public IP.

How do I make it resolve to the internal IP when I request it from the virtual network (and obviously still resolve to the public IP when requested externally).

I'm interested in cli answers as well as configurations through the portal.

Upvotes: 0

Views: 1860

Answers (1)

kim
kim

Reputation: 3421

Azure DNS for IaaS and PaaS solutions

Please see this article for more information on Azure's own DNS service associated with virtual networks. In short

When role instances and VMs hosted in Azure need to resolve domain names to internal IP addresses, they can use one of two methods:

The type of name resolution you use depends on how your VMs and role instances need to communicate with each other.

Azure DNS Private Zones (in preview)

There's also a relatively new service called, Azure DNS Private Zones that allow you to set up a private DNS service to be used with, for example virtual networks.

This service allows you to set up a private domain and private IPs for your machines. See this page for more information and some common usage scenarios.

Also, see this this feature suggestion:

Upvotes: 1

Related Questions