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.

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

1 Answer 1

up vote 10 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
4  
+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 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 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.