I have an EC2 instance with multiple IPs assigned to it. I use IPs for different sites on the same server, it seems that EC2 instance uses the same IP for outgoing traffic.
For instance when I use curl to investigate my IP address using the proxy it gives me the public address not the one I used as proxy.
curl -x 52.4.95.169:3128 https://api.ipify.org/ # 52.4.95.169 is a an elastic IP assigned to the instance
34.12.45.235 # This is the response, the primary instance IP
This essentially defy the purpose of using elastic IPs for me, for security reasons I can't let anyone know that site-A and site-B on the same server.
Is there some way to use different IP for outgoing requests or I must create new instance for each site?