I have a Windows 7 machine connected to 2 subnets, with IP addresses 10.0.0.241 and 172.17.240.94.
On this machine runs a 3rd party java application that internally launches an FTP client session, connecting to a FTP server located in 172.17.240.65.
In some point the application tries to download a file, but then it shows a "connection reset" error (a proprietary application message).
Using a sniffer, I have found that the application issues a wrong FTP command: PORT 10,0,0,240,x,y (where x,y is any port number).
So the problem is self evident: The PORT command has chosen the wrong IP address out of the 2 available ones, and the FTP server tries to connect back to an address out of its network. The right command should be PORT 172,17,240,94,x,y.
On other machines with 2 IP's the application works fine (and PORT command looks fine too), on others not... it seems random.
I haven't access to the source code of the application.
I have tried to shuffle the IP's order in Windows network adapter configuration, with no success.
Is there a way to get the java engine choose the right IP address?