I currently have multiple network alias (eth0, eht0:1, eth0:2), each having their own private ip which has its own public ip. When using remote web driver with phantomjs (ghostdriver), it always chooses the local host (See BUG https://github.com/ariya/phantomjs/issues/10269), for client argument --webdriver=ip:port, thus I cannot rely on phantomjs to pick the correct interface.
I am currently under the impression that I will have to use IPTABLES. I want to route ever instance of my java program using remote web driver to a different public ip when connecting to the phantomjs (ghostdriver) driver. Currently I can only control the port that it listens on.
Any suggestions would be greatly appreciated.