My free tier EC2 instance (ubuntu 11.04, created last year) is expired. I just created a new one (ubuntu 12.04), but found that the new EC2 cannot resolve any hostname. By checking /etc/resolv.conf
.
The old one looks like:
domain ap-northeast-1.compute.internal
search ap-northeast-1.compute.internal
nameserver 172.16.0.23
Where the new one looks like:
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
Is the nameserver configuration not automatically set up now? How should I configure the nameserver, through the AWS console? Do I have to use Route 53? I would rather use a free solution if it's not too complicated to set up.
I was curious so I just launched an instance using AMI "Ubuntu Server 12.04.2 LTS" and I have this in resolv.conf:
So maybe something went wrong when you created your instance. Try launching a new one.
Edit: Since your instance is inside a VPC, try Creating a DHCP Options Set with
domain-name-servers=AmazonProvidedDNS
, then assign the options set to your VPC.Here's what I appear to have observed: when I skipped the configure steps in the Create Wizard, my instance had an empty
resolv.conf
, but when I clicked through the steps (didn't change the defaults, just clicked through dutifully), then the resolution configuration had the nameserver in it.Change the DNS options for your VPC. http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html You can add your private DNS there, and instead of adding the AWS DNS server, the DHCP update will put the addresses you have configured.