I have configured my Windows AWS instance to use two IP addresses and would like to be able to choose which of these two IPs are used for a HTTP GET request using curl (pycurl).
I want it to appear to the server-side that there are two separate clients - almost like one machine using itself as a proxy.
I have configured my instance to use 1.1.1.1 as the static IP and 2.2.2.2 as an additional (proxy) IP address.
> curl --interface 1.1.1.1 example.com
is successful, however, trying with the other IP address yields a Timeout.
> curl --interface 2.2.2.2 example.com
curl: (7) Failed to connect to example.com port 80: Timed out
Setting the verbose flag
> curl --interface 2.2.2.2 --verbose example.com
* Trying 93.184.216.34:80...
* TCP_NODELAY set
* Name '2.2.2.2' family 2 resolved to '2.2.2.2' family 2
* Local port: 0
* connect to 93.184.216.34 port 80 failed: Timed out
* Failed to connect to example.com port 80: Timed out
* Closing connection 0
curl: (7) Failed to connect to example.com port 80: Timed out
Can anyone please shed any light on why this connection might be failing when using the second IP (and how one might fix this in Windows)?
Thank you in advance!