Thursday, January 27, 2011

EC2 Ubuntu Lucid Hostname/ServerName

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

  • 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!

    bradleyg : Thanks. So for a web server I don't need to change my hosts file at all? Or change my hostname?
    Redmumba : 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.
    From Redmumba

0 comments:

Post a Comment