Seeking Assistance with DNS Hostname Resolution Issue in VPC Configuration.

0

I have enabled DNS hostname resolution and added the DNS record 10.10.0.2 within the context of a VPC with CIDR 10.10.0.0/16. However, I am currently facing a challenge where I am unable to access any of the EC2 instances or subnets by their respective names. As of now, I can only utilize IP addresses for accessing these resources. Would you be so kind as to offer your guidance on identifying any potential misconfigurations that might have occurred? Your assistance would be greatly appreciated.

Enter image description here

已提问 9 个月前260 查看次数
2 回答
0
已接受的回答

When you say that you can only access it by IP, is this from a host inside the VPC or from outside? Are you trying to use something like ip-10-1-2-134.us-east-2.compute.internal as the hostname? These will only working inside the VPC.

To connect from outside the VPC by name, you need to have a Public IP on the instance and use the Public IPv4 DNS name which will look something like ec2-3-XX-YY-ZZ.us-east-2.compute.amazonaws.com.

profile pictureAWS
专家
iBehr
已回答 9 个月前
profile picture
专家
已审核 1 个月前
  • Hi iBehr, Thanks for taking time to review my question. I was testing both, inside and from outside.

    Long story short, I am setting up the AWS VPN and connect from outside into VPC. I was able to use nslookup, something like "nslookup google.ca", then, I see the valid response. However, I am not able to open the google.ca page through the browser. I have opened 80, 443 and ICMP for testing.

0
  1. Confirm that you activated DNS support in the VPC To allow private hosted zone record resolution, you must turn on DNS support in your virtual private cloud (VPC). Verify that DNSSupport and DNSHostnames are set to True in your VPC.

  2. Confirm that you associated the correct VPC ID with the private hosted zone When you associate a private hosted zone with a VPC, Route 53 Resolver creates an auto-defined rule and associates it with the VPC. Resources in that VPC can query the Resolver to resolve DNS records in the private hosted zone.

  3. Confirm that you associated the correct VPC ID with your private hosted zone. Also, be sure that you're querying the resource records of the domain from within the same VPC.

To get a list of VPCs associated with a hosted zone, run the following command in the AWS CLI: aws route53 list-hosted-zones-by-vpc --vpc-id VPC_ID --vpc-region REGION_ID

  1. Confirm that you configured forwarding rules for private hosted zone domains in custom DNS servers towards the Amazon-provided DNS server (CIDR+2).
  2. Confirm that private hosted zones don't have overlapping namespaces
  3. Confirm that there's no zone delegation configured in the private hosted zone
  4. Confirm that the Resolver rule and its inbound endpoint resolve to different VPCs

More details refer to https://repost.aws/knowledge-center/route-53-fix-dns-resolution-private-zone.

AWS
已回答 9 个月前
  • Are you suggesting that I should utilize Route 53 to configure the EC2 instance within the VPC?

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则