Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I am trying to make a kind of proxy using elastic IPs on my Amazon EC2 instance. My question is, say I associate an elastic IP to my Amazon instance, and then I make an outbound connection from my EC2 instance to a server, say www.yahoo.com.

What IP address will www.yahoo.com see, the original Amazon EC2 server IP or the elastic IP I have associated to it?

Sorry if this is a basic question, but this is all new to me.

share|improve this question
up vote 17 down vote accepted

If an elastic IP is associated with an EC2 instance, that's the instance's external IP.

You can demonstrate this by doing curl canhazip.com in the command line.

share|improve this answer
7  
+1 for canhazip.com – mgorven Feb 20 '13 at 20:50
    
Also +1 for canhazip.com – chrskly Feb 21 '13 at 0:01
    
Does this apply to VPC's? My outgoing IP does not appear to be the same as the Elastic IP applied to the main interface. – John McKim Sep 17 '14 at 7:51
    
@JohnMcKim Yes, it applies to VPCs. The only caveat is sometimes you'll have your VPC subnet going through a NAT instance rather than directly. – ceejayoz Sep 17 '14 at 12:47

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.