I'm trying to configure an AWS VPC with a public subnet and hardware VPN access, but I have a requirement that connections over the VPN must be able to connect to a particular EC2 instance using a public IP address, not the instance's private IP address.
I read in the VPC FAQ that it is not possible to connect to Elastic IP addresses over the VPN, but found another suggestion that involves the following steps:
- Reserve an Elastic IP (but don't attach it to an instance).
- Route / map requests to the public Elastic IP address to the instance's private IP.
Will this approach work? If so, how do I achieve the second step of mapping the public Elastic IP to the instance's private IP using the AWS console? For this configuration to work, are there any configuration changes that I need to make when setting up the hardware VPN as described in the Amazon guide that I've been using? Thanks in advance for any pointers.
Edit:
Just did a quick test, and I was able to create an Amazon VPN with static routing and specify an IP prefix in the form of a full IP address, such as 203.0.113.5/32. I'm hoping the fact that the management console didn't complain about the format is a positive sign. Any ideas how I might configure the routing table?