Unable to ping shortname in private hosted zone

0

The message I get is: ping: ec2instance: Name or service not known

I can ping between machines in private subnet using FQDN ec2instance.domain.name

I've updated /etc/resolv.conf with the nameservers from my hosted zone Z05297504EJLQIBOS9VH but no luck.

Thanks,

asked 5 years ago1370 views
3 Answers
0

Hi,

Your instance can forward DNS request to the IP address of the Amazon-provided DNS server for your VPC. Amazon DNS server cannot resolve private DNS hostnames if you do not set the following attributes to true:
enableDnsHostnames: Indicate whether instances with public IP get corresponding public DNS hostnames.
enableDnsSupport: If this attribute is false, Amazon provided DNS server that resolves public DNS hostnames to IP addresses is not enabled.

For more information, please refer to this article [1].

To create a private hosted zone using the route 53 console follow this link [2].

[1]- https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support
[2]- https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/hosted-zone-private-creating.html

Regards
/Bennie

Bennie
answered 5 years ago
0

Those things are set up. I can ping it's full name but not the shortname within the VPC. This is for a private hosted zone

works
ping instancename.domain.name

doesnt work
ping instancename

Edited by: witchkinkofangmar on Oct 18, 2019 9:08 AM

answered 5 years ago
0

I actually just added one line in resolv.conf to get it working.

search ec2.internal
search domain.name
nameserver 10.26.50.2
nameserver ns-1536.awsdns-00.co.uk
nameserver ns-0.awsdns-00.com
nameserver ns-1024.awsdns-00.org
nameserver ns-512.awsdns-00.net

I thought since our VPC options were set to domain-name = ec2.internal; I wouldn't need to add the search base

answered 5 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions