Skip to content

Forward queries to public DNS servers if Private Hosted Zone doesn't have specific record

0

Hi,

I've the following configuration.

  • public zone (hosted outside of the AWS) for my domain "domain.com"
  • private zone (AWS Hosted zone) for the same domain "domain.com"
  • client vpn endpoint that uses DNS server (vpc address + 2) to resolve public & private addresses

The private zone contains subset of records, let say server1.domain.com and server2.domain.com. The rest is in the public zone. The problem I have is that when I connect via the client VPN and try to resolve public addressed, I always get error because the private zone has just a subset of records. I'd like to make AWS Hosted Zone to forward the query to public DNS servers whenever it cannot find the address.

2 Answers
0

You cannot do this. If the zone apex is the same for private and public zones (domain.com and domain.com), if the record is not in the internal zone, it will return NXDOMAIN. From the documentation.

If there's a private hosted zone name that matches the domain name in the request, the hosted zone is searched for a record that matches the domain name and DNS type in the request, such as an A record for accounting.example.com.

Note:

If there's a matching private hosted zone but there's no record that matches the domain name and type in the request, Resolver doesn't forward the request to a public DNS resolver. Instead, it returns NXDOMAIN (non-existent domain) to the client.

answered 3 years ago

-1

It's look like route table configuration issue. Create 2 subnets public and private than in route table edit Subnet associations. like public route table has public IPs and private has private IPs and give internet gateway to public route table. It will resolve this issue.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.