I'm working on a project that have the following need:
- use source ip address A to access http service S on Remote Server XX.YY.ZZ.WW
- use source ip address B to access http service T on Remote Server XX.YY.ZZ.WW(same as above)
XX.YY.ZZ.WW is a host I have no control of.
My server is configured with both IP A and IP B on the same Ethernet Interface. My project uses Apache HttpClient. It can be changed to something else if necessary.
Based on my TCP/IP knowledge, this is very easy. As long as I own the IP, I should be able to change the source IP address to whatever I want. But after all, I'm not manipulating IP packet directly. And I have no idea how this can be done with HttpClient.