Community Articles

Find and share helpful community-sourced technical articles.
Labels (1)
avatar
Cloudera Employee

Problem Statement

When a using CDP with default DHCP Option Set (Use AmazonProvided DNS & AmazonProvidedNameServer) attached to the VPC and need to resolve some on-prem server controlled by an internal DNS server, it does not work by default as those internal servers are not resolvable by Route53 AWS service. Is there a way to resolve the internal on-prem/cloud servers from CDP hosts on AWS? 

Context

  • The diagram below shows the typical flow for any DNS resolution request. 
  • This document addresses the last part in the diagram when Route53 tries to resolve a domain name that is owned by a private DNS server.
    omkardeshmane_1-1597068822002.png

Requirement

Minimum 2 subnets, each one in a separate AZ for Route53 Resolver to work.

Assumptions

Before going to the ‘how to’ part, let's look at the assumptions to make this solution work in your environment:

  • If you use an on-premise DNS server, then you must have connectivity to this server from your VPC
  • This document only depicts Outbound resolution requests originating from your AWS VPC
  • If you are using a DNS server in a different VPC in your AWS account, you have a VPC Peering connection with CDP VPC

Testing Methodology

  • The dnsmasq is installed and configured to resolve the custom.r53.test2.com domain for a quick proof of concept
  • This document explains the solution with 2 EC2 instances in the same VPC. One acts as the DNS server and the other one is being a client.

How to

  1. Set up a VPC with a default DHCP option:  

    omkardeshmane_2-1597068892444.png
  2. Make sure you have access to the DNS server you want to use from this VPC. For the scope of this document, we have used public subnets with Internet Gateway which routes traffic to the internet. (You can have different combinations like NAT Gateway, VPN, Direct Connect, etc): omkardeshmane_3-1597068932447.png
  3. Setup one EC2 instance which acts as a DNS client. This can be one of your CDP Host running in this VPC:
    omkardeshmane_4-1597068984986.png
  4. Make an entry in the configuration file on the DNS server with the hostname and IP address.
    omkardeshmane_5-1597069028639.png
  5. Configure Outbound endpoint in Route53 Resolver by going to the Route53 Resolver console on AWS Portal:
    omkardeshmane_6-1597069104900.png
    omkardeshmane_7-1597069104873.png
    omkardeshmane_8-1597069104906.png
  6. Give it a name, choose the right VPC, SG, and minimum 2 subnets for High Availability, and click NEXT:.
    omkardeshmane_9-1597069135748.png

    omkardeshmane_10-1597069135770.png
    omkardeshmane_11-1597069135744.png
  7. On the next page, create a new rule like the following: 
    omkardeshmane_12-1597069176904.png
    omkardeshmane_13-1597069176906.png
  8. Click Next and Submit.
  9. At this point, the setup is complete.
  10. Test it by running dig worker1.custom.r53.test2.com +short command on DNS client ec2 instance.
    omkardeshmane_14-1597069205816.png

Typical Architecture Diagram

omkardeshmane_15-1597069245126.png


Additional Information

More information on AWS Route53 Resolver Rules and Endpoints, watch this video.

1,066 Views