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'm trying to move my server from linode to EC2 and am following the guide located here - http://library.linode.com/getting-started/

One problem I have is when I set my hostname to my public DNS:

echo "ec2-46-51-***-**" > /etc/hostname

And add to my elastic ip and public DNS to /etc/hosts:

46.51.***.*** c2-46-51-131-72.eu-west-1.compute.amazonaws.com c2-46-51-131-72

I can no longer log on. Should I be using internal IP and private dns names?

Thanks

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The internal and private IPs/DNs are only for use from within the Amazon network (i.e., from other EC2 servers). The elastic IP only allows you to bind a static IP to a chosen VM. You should probably be doing one of two things:

  1. Connect to the public IP that's generated whenever you launch a new instance, or
  2. Bind the elastic IP and use that.

Neither should require you modifying the network setup on the VM.

Good luck!

share|improve this answer
    
Thanks. So for a web server I don't need to change my hosts file at all? Or change my hostname? –  bradleyg Sep 9 '10 at 13:27
    
You shouldn't, no, but try it without touching the system files first to confirm. When tweaking configs, you should always start with the defaults, and then work from there. –  Andrew M. Sep 9 '10 at 13:37

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.