muffel
muffel

Reputation: 7360

Query Route53 Private Hosted Zone with custom DHCP Options Set

I have

As I am not using the AWS Nameservers in the DHCP Options Set, I can't resolve myzone.local from any EC2 instance in myvpc. That is intended behavior.

There is a single EC2 instance in that VPC that runs a DNS server. I want that instance to forward queries for myzone.local to the Route53 Private Zone.

How can I get a hostname that may be used as forward resolver by my instance? I was trying to use the public Route53 Nameservers and hoping that - if queried from myvpc they'd answer for myzone.local, but that wasn't the case.

Upvotes: 2

Views: 1307

Answers (1)

Michael - sqlbot
Michael - sqlbot

Reputation: 179084

The IP address of the VPC resolver is 169.254.169.253 in every VPC.

Or, you can use the address at +2 from the base of the VPC CIDR, so for 10.0.0.0/16 the resolver would be 10.0.0.2, and for 172.31.0.0/16 the resolver would be 172.31.0.2.

https://docs.aws.amazon.com/vpc/latest/userguide/VPC_DHCP_Options.html#AmazonDNS

The two are equivalent, and both will provide resolution of names from a private hosted zone attached to the VPC.

enableDnsSupport needs to be enabled for the VPC.

Upvotes: 3

Related Questions