Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have booted up an instance in side a private VPC. I assigned an ElasticIp address to it and I can ssh into the instance with no issues. However, DNS is not resolving :(

in my /etc/resolv.conf I have

nameserver  172.16.0.23
domain eu-west-1.compute.internal
search eu-west-1.compute.internal

but when I try and ping 172.16.0.23 I get

icmp_seq=156 Destination Net Unreachable

Which makes sense as I have no route to that private subnet. I can ping any external ip address i.e

ping 173.194.69.139

but I cannot

ping google.com

I created the VPC using the wizard I assume that the VPC is assigning the /etc/resolv.conf settings.

and the documentation says I should have external dns access, but I don't.

Can anyone help?

share|improve this question
    
Is that the real IP of the external DNS server you're trying to use? –  EEAA Jan 16 '13 at 18:19
    
yes it is. It works when I use a normal aws instance. i.e not in the VPC –  Alistair Prestidge Jan 17 '13 at 21:03

2 Answers 2

In the VPC Service control panel you can create DHCP Options Sets. Create one of those with the nameservers you want to use.

Then, under "Your VPCs", change the DHCP Options Set in use by your VPC to be the new one you just created.

If you are going to have more than a few servers in your VPC, you might want to consider running your own internal caching DNS resolver.

share|improve this answer
    
Can I not use the default DNS server that AWS has assigned? do I have to use one I define? –  Alistair Prestidge Jan 16 '13 at 17:19
    
I tried your suggestion of creating my own DHCP options but for some reason they are not being used nothing updates in /etc/resolve.conf and I still cannot ping a domain name –  Alistair Prestidge Jan 17 '13 at 21:33

So it turns out it was something to do with AMI I was using. For some reason I could not get it to update the DNS servers.

I tried 3 other public AMI's and it worked fine on boot with no issues. It picked up the settings I defined in the DHCP settings.

So the answer here is just not to use that AMI in VPC.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.