I have a Java Program that needs to invoke a URL, that is reachable only after a VPN connection has been established (to a remote VPN host). The program runs on a Linux box.
Therefore, I need to be able to start/stop the VPN connection as-needed (essentially I do not need it 24 hours).
What is the best way for this:
- Can i create a VPN Connection programatically in Java? Is it even possible?
- Can i install VPN Client software on Linux Machine, and then via a shell script (which i will invoke via Java), start/stop the VPN Client Connection whenever needed. Is this viable or better solution?