2
votes

I have

  • an AWS VPC myvpc with a default DHCP Options Set, setting a custom nameserver
  • a Route53 Private Hosted Zone myzone.local attached to this VPC

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.

1

1 Answers

3
votes

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.