Custom DNS Configuration for AWS VPC Instances

Configure Custom DNS for VPC Instances

Question

You want to ensure that instance in a VPC does not use AWS DNS for routing DNS requests as you want to use your own managed DNS instance.

How can this be achieved?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: B.

Option A is incorrect because you cannot make changes to the existing DHCP options set.

Option B is CORRECT because, in order to use your own DNS server, you need to ensure that you create a new custom DHCP options set with the IP of the custom DNS server.

Option C is incorrect because the route tables can only work with VPC routes and are not a custom DNS solution.

Option D is incorrect because to manage your own DNS instance, your need to work at the VPC level and not at the subnet level.

For more information on the DHCP options set, kindly refer to the URL below:

https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html

To ensure that instances in a VPC use a custom DNS server, and not the AWS DNS server, the DHCP options set must be modified. DHCP options set is a collection of DHCP options that can be assigned to a VPC, subnet, or individual network interface. These options provide information such as the domain name and DNS server addresses that the instances should use.

Option A: Change the existing DHCP options set

The existing DHCP options set should be modified to specify the IP addresses of the custom DNS servers that should be used by the instances in the VPC. The steps to modify the DHCP options set are as follows:

  1. Open the Amazon VPC console.
  2. In the navigation pane, choose DHCP options sets.
  3. Select the DHCP options set that is currently assigned to the VPC.
  4. Choose the Actions menu, and then choose Edit.
  5. Modify the DNS servers option to specify the IP addresses of the custom DNS servers.
  6. Choose Save.

After the DHCP options set is modified, the instances in the VPC will use the custom DNS servers specified in the DHCP options set.

Option B: Create a new DHCP options set and replace the existing one

If the existing DHCP options set cannot be modified or if a new DHCP options set is desired, a new DHCP options set can be created and assigned to the VPC. The steps to create and assign a new DHCP options set are as follows:

  1. Open the Amazon VPC console.
  2. In the navigation pane, choose DHCP options sets.
  3. Choose Create DHCP options set.
  4. Specify the DNS servers and other DHCP options as desired.
  5. Choose Create DHCP options set.
  6. Select the VPC that should use the new DHCP options set.
  7. Choose the Actions menu, and then choose Edit DHCP options set.
  8. Select the new DHCP options set, and then choose Save.

After the new DHCP options set is assigned to the VPC, the instances in the VPC will use the custom DNS servers specified in the new DHCP options set.

Option C: Change the route table for the VPC

Changing the route table for the VPC will not affect the DNS resolution for the instances. The route table is used to determine how traffic should be routed within the VPC and to other networks. The DNS resolution is controlled by the DHCP options set.

Option D: Change the subnet configuration to allow DNS requests from the new DNS Server

Changing the subnet configuration to allow DNS requests from the new DNS server will not affect the DNS resolution for the instances. The subnet configuration specifies the network settings for the subnet, such as the IP address range and the network ACLs. The DNS resolution is controlled by the DHCP options set.