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.

Is it possible to have the Elastic IP (attached to the interface in the AWS console) available as the interface IP withing virtualized machine - currently eth0's IP is the private IP and the routing from EIP to the machine is done via some kind of NAT henceforth it's not possible for the running application to bind to the defined Elastic IP.

share|improve this question
1  
Why do you need to bind to the public IP? Given 1:1 NAT, why wouldn't binding to the private IP work just fine? –  Skyhawk Nov 16 '12 at 16:09
    
yeah, it kinda works but... while I get traffic just fine I also need to announce those particular EIPs. Bottomline - it will probably require some tweaking in the application to bind locally while correctly announce/serve public IPs –  Wojtek Nov 17 '12 at 20:07
    
Good idea. This might help: stackoverflow.com/questions/7525702/… –  Skyhawk Nov 17 '12 at 20:12
    
O, handy - thanks! :) –  Wojtek Nov 18 '12 at 20:20
add comment

1 Answer

up vote 4 down vote accepted

No, it is not possible. Elastic IPs are tied to your account, not to individual instances, so the instance's interface IP will always be private.

  • EC2 Private IP Address: The internal RFC 1918 address of an instance that is only routable within the EC2 Cloud. Network traffic originating outside the EC2 network cannot route to this IP, and must use the Public IP or Elastic IP Address mapped to the instance.

  • EC2 Public IP Address: Internet routable IP address assigned by the system for all instances. Traffic routed to the Public IP is translated via 1:1 Network Address Translation (NAT) and forwarded to the Private IP address of an instance. The mapping of a Public IP to Private IP of an instance is the default launch configuration for all instance types. Public IP Addresses are no longer usable upon instance termination.

  • EC2 Elastic IP Address: Internet routable IP address allocated to an AWS EC2 account. Similar to EC2 Public Address, 1:1 NAT is used to map Elastic IP Addresses with their associated Private IP addresses. Unlike a standard EC2 Public IP Address, Elastic IP Addresses are allocated to accounts and can be remapped to other instances when desired.

Source: this article on elastic IPs.

If this really is a deal-breaking feature, Rackspace next gen cloud servers gives you a public IP on eth0 by default.

share|improve this answer
    
Thanks. That would be nice, unfortunately it's not my decision which cloud provider to use... –  Wojtek Nov 17 '12 at 20:08
add comment

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.