I set up an AWS instance in my VPC with a private IP address -- no public IP address. This is going to be my MongoDB instance and will only be accessed by other servers within the VPC. I established a successful VPN connection and can SSH using Putty to the instance using the private IP address - "10.0.0.95". So far, so good. I noticed that the private IP address also has a Private DNS - "ip-10-0-0-95.internal". I tried using the Private DNS to access the instance through the VPN but got this Putty error "Unable to open connection to ip-10-0-0-95.ec2.internal. Host does not exist". Clearly, I can use the 10.0.0.95 IP address but was surprised that the private DNS name did not work. How come?
You should enable the DNS resolution for your VPC, or you won't be able to resolve internal DNS names.
To use private hosted zones, you must set the following Amazon VPC settings to true:
Steps to enable DNS resolution:
For more info: http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-dns.html#vpc-dns-updating
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.