0

I have a VPC network inside AWS which is where all our new servers are. However, we have some old servers outside the VPC in the EC2 cloud network.

Currently we have a blog on http://blog.mydomain.com. However, we want to change it to respond on http://mydomain.com/blog/.

In order to do that we are going to use Nginx as a reverse proxy, but the Nginx server is inside the VPC. Is it possible to somehow (realiably and hopefully fast) access the non-VPC EC2 network from within the VPC?

Thanks

1
  • Can't you simply attach a public IPs to both instances? Assuming they are in the same AZ there would just be some fast hairpin routing / NATing occurring. Apr 23, 2014 at 0:14

2 Answers 2

0

It seems like you may be assuming this is more complicated than it is.

You should be able to access anything on the Internet in general -- including and especially EC2 instances -- from within a VPC by using a NAT instance, which is likely how your VPC machines are already accessing AWS services like S3, SQS, SNS, etc., or external resources like downloading software updates.

http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html

You don't need a tunnel, unless you need the traffic to be encrypted, which seems unlikely (since you could just use SSL) ... and if you do have a tunnel, you'll still need a NAT instance in order for your GRE traffic to make it out to the EC2 machine and the responses to come back... unless your Nginx machine already has an external public IP address of its own... in which case, you don't need anything, because you already have the fastest possible connectivity between the VPC machine and the EC2 machine.

0

You can use a GRE tunnel to amazon VPC http://www.creativenet.co.il/1/post/2013/08/gre-or-ipip-tunnels-between-vpcs-in-amazon.html. This is a reliable option that I've been using at work for some time now. I have it connecting our corporate office with an amazon VPC. I don't see why you couldn't apply the same to an EC2 Instance that is not located inside your VPC.

EDIT

Please note that in order for this to work i needed to use a RHEL 6.4 image and not the amazon linux flavor.

2
  • Thanks! Do you think it is fast enough for a request-response cycle?
    – tucaz
    Apr 22, 2014 at 16:27
  • GRE Tunnels do come with a performance hit, though depending on your scenario you may or may not notice the overhead. If it does not work for you there are other tunnels that can be used.
    – bwight
    Apr 22, 2014 at 19:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .