“I can’t resolve on-premises server names from EC2.”
“After moving to Kubernetes, calls to an external API got slow.”
In cloud and container environments, the parts of DNS are built into places you can’t easily see. Without knowing how they work, you can’t even tell where a name is being resolved, and isolating a problem takes a long time.
But don’t worry. Even if the names of the parts change, what’s inside is the same “caching DNS, authoritative DNS, and conditional forwarding” we saw up through Part 3. In Part 10 we look at AWS DNS centered on Route 53, hybrid name resolution with on-premises networks, how it maps to Azure, and then DNS for AD-integrated DNS, Kubernetes, and vSphere.
▶ This part is also available as a YouTube video (about 19 min) (it is also embedded at the end of this article).
- Route 53 overview and hosted zones
- Alias records, routing policies, and health checks
- VPC DNS (Route 53 VPC Resolver)
- Resolver endpoints and forwarding rules
- Query logs, DNS Firewall, and Global Resolver
- Hybrid name resolution with on-premises networks
- How Azure compares
- AD-integrated DNS
- DNS in Kubernetes
- Why DNS matters for products such as vSphere
- Think about it
- Summary
- Watch the video
- The DNS Fundamentals series (12 parts)
Route 53 overview and hosted zones
Route 53 is AWS’s DNS service, and it has three roles.

- Hosted zones: authoritative DNS servers
- Domain registration: a registrar
- VPC Resolver: a full-service resolver used inside a VPC
There are two kinds of hosted zones.
- Public hosted zone: A zone published to the internet. Creating one assigns four name servers (awsdns domains in com, net, org, and co.uk). Delegation is not complete until you register these four as NS at your registrar (Part 2)
- Private hosted zone: A zone that can be queried only from within the VPCs you associate with it
If you create a public and a private zone with the same name, you get split horizon, with different answers inside and outside the VPC (Part 7). If you think of this as one service containing three DNS functions with different roles, it won’t be confusing.
Alias records, routing policies, and health checks
| Feature | How it behaves as DNS | Notes |
|---|---|---|
| Alias record | Route 53 resolves the target internally and answers as A/AAAA | Can also be used at the zone apex. A Route 53-specific feature that cannot be reproduced with zone transfers or another provider’s DNS |
| TTL of an alias | The target’s TTL is used (fixed at 60 seconds when pointing to an ELB) | You cannot set the TTL yourself. Queries to aliases for AWS resources are not charged |
| Weighted | Changes the answer according to the weight ratio | Answers are cached, so the actual ratio is only approximate |
| Latency, geolocation, and IP-based | Changes the answer by where the query comes from (the caching DNS’s IP, or the client’s subnet if ECS is supported) | Through an internal forwarder, the decision is based on the location of that egress point |
| Failover + health check | Returns the primary answer when healthy and the standby answer when not | Switches only after the TTL expires. In private hosted zones the checkers are outside the VPC, so use a type based on a CloudWatch alarm |
| Multivalue answer | Returns up to 8 healthy records at random | Not a substitute for a load balancer |

The point to take away is that all of these change the answer that the authoritative DNS returns. They have no effect until the TTL expires for caching DNS servers and devices that already hold an answer (Part 3). Route 53 changes the answer; the caching DNS remembers the old one.
Also note that latency and geolocation routing decide based on “where the query comes from,” so through an internal forwarder, the decision is based on the location of that egress point. Even an employee in Osaka is judged to be in “Tokyo” if the query comes from a DMZ in Tokyo.
VPC DNS (Route 53 VPC Resolver)
EC2 instances in a VPC use AWS’s full-service resolver, the Route 53 VPC Resolver (renamed from Route 53 Resolver in 2025), through the AmazonProvidedDNS in the DHCP option set. The destination is the first address of the CIDR plus 2 (10.0.0.2 for 10.0.0.0/16) or 169.254.169.253.

- You cannot use private hosted zones unless both VPC attributes, enableDnsSupport and enableDnsHostnames, are enabled
- The forwarding rule or private hosted zone that matches the name most specifically is used, and for the same name, the forwarding rule takes priority
- A name that is not in the matching zone gets NXDOMAIN without asking the internet
- There is a limit of 1,024 packets per second per ENI
The third point is an easy one to get caught on. For example, if you create a private hosted zone for example.com, www.example.com, which you did not register there, returns NXDOMAIN even if it is published on the internet.
Resolver endpoints and forwarding rules
These are the parts that let on-premises networks and VPCs resolve each other’s names.
| Part | Direction | Role | Design notes |
|---|---|---|---|
| Inbound endpoint | On-premises → VPC | The destination to which the on-premises DNS forwards using conditional forwarders. Returns the same answers as VPC Resolver (including private hosted zones) | Place IPs in two or more AZs. Allow TCP/UDP 53 in the security group |
| Outbound endpoint | VPC → on-premises | Sends queries that match a forwarding rule out to the on-premises DNS | On the on-premises side, allow queries from the source (the endpoint’s IPs) |
| Forwarding rule (FORWARD) | VPC → on-premises | Forwards names such as corp.example.com to the specified DNS. Takes effect when associated with a VPC | Register two or more on-premises DNS servers as targets |
| System rule (SYSTEM) | n/a | An exception to forwarding rules that makes VPC Resolver resolve specific names | Example: forward . entirely to on-premises, but make amazonaws.com an exception |
| Delegation rule (DELEGATE) | Both directions | Connects to on-premises through NS record delegation instead of a conditional forwarder (since 2025) | For DNS products where conditional forwarders are hard to configure |
| Sharing | n/a | Share rules with other accounts through AWS RAM. Route 53 Profiles distribute zones, rules, and DNS Firewall together | Endpoints can be consolidated in a central account |

A single endpoint IP can handle roughly 10,000 UDP queries per second (less with large responses or slow forwarding targets). Pricing depends on the number of IPs and the number of queries.
These look like new parts, but the idea behind forwarding rules is exactly the conditional forwarding of Part 3.
Query logs, DNS Firewall, and Global Resolver

- Query logs: Record queries from the VPC to VPC Resolver, queries that pass through endpoints, and DNS Firewall decisions. They can be sent to CloudWatch Logs, S3, and Firehose. Knowing “which instance looked up what, and when” is a clue for both outage and security investigations. However, queries answered from device or OS caches, and queries dropped at the 1,024 pps limit, do not appear in the logs
- DNS Firewall: Allows (ALLOW), blocks (BLOCK), or alerts on (ALERT) queries leaving the VPC using domain lists. When blocking, you choose whether to answer with NODATA, NXDOMAIN, or OVERRIDE (replacement with a CNAME). There are AWS-managed domain lists (malware, etc.) and DNS Firewall Advanced (detects DNS tunneling and DGA). This is the cloud version of the protective DNS and RPZ in Part 9
- Route 53 Global Resolver (generally available in March 2026): A resolver that lets on-premises and remote devices resolve private hosted zone names and internet names over anycast. Filtering and logs can also be consolidated in one place
DNS Firewall decides by name only. It cannot stop traffic that specifies an IP address directly or goes out through DoH. Start with ALERT to check the impact, then switch to BLOCK.
Hybrid name resolution with on-premises networks
So how should you design for the opening problem, “I can’t resolve on-premises names from EC2”? Between on-premises and AWS, the two sides resolve each other’s names with conditional forwarders in both directions.

- On-premises → AWS: When an on-premises device looks up
app.aws.corp.example.com, the internal DNS forwards over VPN or Direct Connect to the inbound endpoint, and the answer from the private hosted zone comes back - AWS → on-premises: When EC2 looks up
dc01.corp.example.com, the forwarding rule sends it from the outbound endpoint to the on-premises DNS
On the way there, ② is the inbound endpoint; on the way back, ⑥ is the outbound endpoint. There are three key points in the design:
- Put the AWS side in a subdomain such as
aws.corp.example.comto keep the forwarding conditions simple - Do not create a loop in which forwarding bounces between the same VPC and on-premises
- Use two or more of everything: AZs, DNS servers, and lines
How Azure compares
In Azure, too, the roles of the parts map one to one, even though the names differ.
| Role | AWS | Azure | Differences and notes |
|---|---|---|---|
| Public zones (authoritative DNS) | Route 53 public hosted zones | Azure DNS (public DNS) | Both have aliases that point to your own resources at the zone apex |
| Internal zones | Private hosted zones (associated with VPCs) | Private DNS zones (virtual network links) | Azure can automatically register VM names |
| Resolver inside the VPC/VNet | VPC Resolver (CIDR + 2, 169.254.169.253) | Azure-provided DNS (168.63.129.16) | Neither can be reached directly from on-premises |
| On-premises → cloud | Inbound endpoint | Inbound endpoint of DNS Private Resolver | Setting 168.63.129.16 as a forwarding target on-premises does not work |
| Cloud → on-premises | Outbound endpoint + forwarding rules | Outbound endpoint + DNS forwarding ruleset | A ruleset takes effect only after it is linked to a VNet |
| Filtering and logs | DNS Firewall, query logs | DNS resolver policy (allow, block, alert, threat intelligence) | Both decide by name |
| Traffic steering with DNS | Routing policies + health checks | Traffic Manager | The Azure DNS zone itself has no steering feature |

A common failure in Azure is forgetting to conditionally forward the privatelink.* zones for private endpoints from the on-premises DNS, so a public IP is returned. The same thing happens with AWS VPC endpoints. When “a cloud storage account is reached over the internet, but only from inside the company,” suspect this first.
AD-integrated DNS
This is the DNS of Active Directory, the representative corporate environment.
- AD-integrated zones: The zone data is stored in the AD database and replicated to DCs by AD replication. Any DC can accept writes (multi-master), which is a different mechanism from the primary/secondary and zone transfers of Part 7
- SRV records: The DC’s Netlogon service automatically registers records such as
_ldap._tcp.dc._msdcs.<domain>, and clients find DCs by SRV (Part 6) - The _msdcs zone:
_msdcs.<forest root>is replicated across the whole forest. If it cannot be resolved when finding DCs from a child domain or from a different DNS, domain join and authentication fail - Dynamic updates: Devices register their own A and PTR records. With “Secure only” dynamic updates, only the registered computer can modify its own records
- DC DNS settings: A DC’s DNS list should have other DCs first and itself last. External names are consolidated through a forwarder to the caching DNS (Part 3)
$ dig +short SRV _ldap._tcp.dc._msdcs.corp.example.com
0 100 389 dc01.corp.example.com.
0 100 389 dc02.corp.example.com.
PS> Resolve-DnsName _ldap._tcp.dc._msdcs.corp.example.com -Type SRV
PS> nltest /dsgetdc:corp.example.com # the DC actually found
Scavenging
One more thing to know about AD-integrated DNS is scavenging (automatic deletion of stale records).

The defaults are a 7-day no-refresh interval plus a 7-day refresh interval, so a record that has not been refreshed for 14 days is judged stale. It does not run unless enabled on both the zone and the server, and if you set the interval to under 24 hours, records of live devices are deleted too. If records for retired servers or DCs keep lingering, check your scavenging settings.
DNS in Kubernetes
This is about the opening problem: “After moving to Kubernetes, calls to an external API got slow.”
Inside the cluster, CoreDNS acts both as an authoritative DNS that answers Service names and as a caching DNS that resolves external names. A Service can be resolved as <service-name>.<namespace>.svc.cluster.local.
A Pod’s /etc/resolv.conf (default dnsPolicy: ClusterFirst, example in namespace prod) looks like this:
nameserver 10.96.0.10
search prod.svc.cluster.local svc.cluster.local cluster.local
options ndots:5

What ndots:5 means: A name with fewer than 5 dots is first tried with the search domains appended. When you look up the external api.example.com, three names such as api.example.com.prod.svc.cluster.local get NXDOMAIN before the real name is queried, so there are up to 8 queries, counting A and AAAA (more if the node’s search list is added).
- Impact: More queries to CoreDNS and the upstream DNS, and slower name resolution. On AWS you can also hit the 1,024 pps per-ENI limit
- Fixes: Write external names as an FQDN with a trailing dot, lower ndots with the Pod’s dnsConfig (for example, to 2), place a cache on each node with NodeLocal DNSCache, and tune the CoreDNS replica count and cache
The “trailing dot” and “search domain” topics from Parts 2 and 3 are what matter here.
Why DNS matters for products such as vSphere
Finally, the relationship between infrastructure products and DNS. For many products, DNS is a prerequisite for deployment.

In vSphere, the typical example, when you deploy vCenter Server by FQDN, it is a requirement that both the forward (A) and reverse (PTR) records are registered and match. If they don’t, deployment or first boot fails. The vCenter name is built into certificates and single sign-on, so changing it later is a big job.
There are other examples as well:
- vCenter email notifications are not sent if the sender or recipient domain cannot be resolved in DNS (Broadcom KB 321441)
- When you use Kerberos authentication for NFS 4.1 on ESXi, you need DNS that can find the KDC through SRV records
Kerberos checks the other party by name, and certificates are issued for names, so the same applies to many products. Names get baked into products, so rather than fixing them later, check the product’s DNS requirements before you build and register A and PTR records first.
Think about it
- In your AWS (or Azure) VPC, which DNS server do EC2 instances use? By what path are on-premises names resolved?
- Is scavenging enabled in your AD DNS? Think of a way to check whether records for retired servers or DCs remain.
- A Pod in Kubernetes runs an app that calls an external API 100 times per second. How many DNS queries per second would the ndots setting and the search list produce?
Hint: For question 1, think about the DHCP option set and forwarding rules. For question 2, think about timestamps and netlogon.dns. For question 3, think about the number of search domains and A/AAAA.
Summary
- Route 53 has three roles: authoritative DNS, registrar, and VPC resolver. For public zones, delegation is complete when the 4 NS servers are registered with the parent
- Routing policies only change the authoritative answer. They do not affect caches until the TTL expires
- VPC Resolver returns NXDOMAIN for a name not in the matching zone
- Hybrid uses conditional forwarders in both directions. Put the AWS side in a subdomain
- AD-integrated DNS is multi-master. Know SRV, _msdcs, and scavenging
- In Kubernetes, ndots:5 increases queries for external names. For vSphere, matching forward and reverse records is a prerequisite
Next time, we pull together what we have learned so far into the steps for isolating DNS failures.
Watch the video
This part is also explained in a YouTube video (about 19 min).
All parts of the series are in the DNS Fundamentals playlist on YouTube.
The DNS Fundamentals series (12 parts)
All 12 parts with a reading guide: DNS Fundamentals
- What Is DNS? How Name Resolution Works and Its Three Key Players
- The domain name hierarchy and delegation
- How name resolution works
- DNS messages and transport
- Resource records, part 1
- Resource records, part 2
- Running authoritative DNS servers
- Investigating with commands
- DNS security
- DNS in the cloud and on corporate networks (this article)
- DNS troubleshooting
- DNS design exercises
This series is the English edition of 【DNS入門】, originally written in Japanese.


コメント