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
답변함 8달 전
profile picture
전문가
검토됨 한 달 전
  • 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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠