VPC Peering - DNS resolves to public IP

475 views Asked by At

I have configured VPC peering connection between VPC A and VPC B (they are in different accounts but in the same region), and when I try to resolve the domain name of a service (e.g. sometest.com) that is in the VPC B from an instance VPC A, it is supposed to point to a private IP but it resolves to the public IP. The route tables for both VPCs have corresponding entries for peer connection, also security groups allow traffic from/to the peered VPC, and both VPC have "Enable DNS resolution/hostnames enabled.

I'm not sure why it resolves to the public IP - what am I missing?

1

There are 1 answers

0
Surya Prakash Patel On BEST ANSWER

you need to have vpc-association-authorization established between 2 VPC's and private zones to be able to resolve private hosted zone addresses from 1 vpc in one region/account to another vpc in another region/account

you can follow this step to step guide : https://aws.amazon.com/premiumsupport/knowledge-center/route53-private-hosted-zone/