I'm trying to bind a java process to a specific virtual interface having IP address <myIFaddr>
as follows:
export BIND_ADDR=<myIFaddr> LD_PRELOAD=./bind.so
exec java -jar ppp.jar
The program ppp.jar
simply makes a request on an HTTP server, which replies sending back the IP address of the client, printing this address to stdout.
As a result, the java program prints the IP address of the "physical interface" (non the virtual one, having a different IP address).
Is there a way to solve this problem, applying a correct/different binding?
Thanks