Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Ec2 gives a public hostname to each instance instead of assigning an ip. I want to do the same. I want to access my machines like that. >> >>

Internet > proxy-server > (machine1, machine2)Intranet

What should I use as a proxy server and How can I configure that. Apache? nginx?


I just created an instance. It has private ip of and it has public domain name

share|improve this question
Your question isn't clear. Are you talking about something specific with EC2 or are you using that as an example. Are you asking about DNS, or about a hosting solution / issue? – EightBitTony Jun 11 '12 at 13:49

Amazon also gives you a public IP and a private IP, the difference is how those 2 resolve. If you resolve from inside AWS you get the private IP and from outside you get the valid public IP address. You can do the same, you just need 2 DNS servers (one external and one internal to your network) and any kind of firewall that does NAT (so you can assign 1-to-1 NAT mappings from a valid IP to an internal one).

share|improve this answer
I dont think aws assigns public ip to an each instance unless you manually do so. – Oguz Bilgic Jun 11 '12 at 13:06
Check the interface for Public DNS and Private DNS. Ping the Public DNS from outside AWS and you will get it as a valid IP. You can also assign a Elastic IP to the instance, the difference being that the Public and Private IPs will change when you reboot your image, but the Elastic IP never changes. The Public DNS is like ec2-<valid> – coredump Jun 11 '12 at 13:11

If you want to access your machines using domain names, you have two options:

  1. Setup and run an internal DNS server like bind and configure your server with the IPs you want.
  2. Modify your hosts file on the machine you want to access these machines from.
share|improve this answer
+1 I think a basic DNS overview would be helpful too for the OP. – gravyface Jun 11 '12 at 13:08
I want to access them from public Internet. – Oguz Bilgic Jun 11 '12 at 13:19

Your Answer


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.