Score:0

AWS Natting Request through Site-to-Site VPN

ng flag

I have a following specific requirement that I need to setup to access on premise server of one of the payment processor vendor that I am trying to access from EC2 instance. I don't have extensive knowledge about networking so please feel to correct me if I have made mistake in the post.

The specific requirement to achieve this is as illustrated in the diagram, enter image description here

To do this, I have created a site to site VPN connection that allows me to connect from VPC to the on-premise server using Route Tables, virtual private gateway and customer gateway. Customer gateway being the on-premise server IP address.

Problem, that I am now facing is on way to transform the originating IP address as they expect it to come through 10.250.XX.XX/28 instead of the public IP address of EC2 instance.

I tried setting the Local Address and Remote Address CDR to 10.250.XX.XX/28 and 182.93.XX.XX/27 in site to site VPN, but the result is the same. I even tried setting IPTable rules from the ec2 instance as follows,

sudo iptables -t nat -A POSTROUTING -d 182.93.XX.XX/28 -j SNAT --to-source 10.250.XX.XX

but using this stopped any outgoing request through ICMP ping.

I would really appreciate if you can guide me on resolving this issue and provide hint on if there is any way to achieve this using AWS.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.