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?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ