So I have a test server with a vpn which i've created a script to connect to a particular vpn using the cisco vpncli and it works great when I run it manually or call my deployment as its part of it.
How can I programmatically tell if a VPN is connected on my remote server? I assume I can ping a particular address which is only reachable when the vpn is connected via the remote server, How would I easily go about doing this?
As part of my test automation i need to confirm the VPN is connected before I continue with the run, if not I then want to turn it on.
I'm not looking for a copy and paste job here, Im looking for guidance on how I would achieve my task.
Is this the kind of approach I should take or is there something simpler?