Enable Cross-Peer DNS

Enable Cross-Peer DNS

In this section, you will enable Cross-peering DNS to allow EC2 - My VPC to query EC2 - HG VPC**’s public DNS and return the IP address private of the VPC EC2- HG VPC and the connection will then go through the AWS intranet.

If this feature is not enabled, the connection between EC2 instances of EC2 - My VPC when querying EC2’s public DNS - HC VPC will return the public IP address and the connection will then go through the Internet.

  1. Return to VPC Management Console

Cross-Peer DNS

  1. Select Peering Connections in the left sidebar.

    • Then, tick VPC peering connection between the 2 VPCs we have created.
    • Select Actions
    • Select Edit DNS settings

Cross-Peer DNS

  1. In the Edit DNS Settings page, check the two boxes next to Requester DNS resolution and Accepter DNS resolution.

Cross-Peer DNS

  1. Click Save then Close. This will take a few minutes to execute.

Cross-Peer DNS

  1. From EC2 - My VPC, try to ping Public DNS of EC2 - HG VPC, and we will ping successfully.

Cross-Peer DNS