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.

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.

machine1.mycompany.com >> 10.0.0.123
machine2.mycompany.com >> 10.0.0.234

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

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

Example:

I just created an instance. It has private ip of 10.34.90.77 and it has public domain name ec2-50-17-23-238.compute-1.amazonaws.com.

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

2 Answers 2

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>ip.compute-1.amazonaws.com –  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

 
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.