Apple - How to keep a VPN connection alive on an iPhone?
According to this thread this is standard for most users. But there is Jailbreak solution with external app called Insomnia
Insomnia is an iPhone native application that, when enabled, will prevent the iPhone from sleeping, thus overriding its default behavior. This allows background applications to continue to run and WiFi to work long after the screen has been switched off.
(The iPhone's default behavior is to sleep 30 seconds after the screen has gone off, when not docked and charging that is).
Downside of this is your cpu etc is still running so battery will go down quickly.
There is also a tweak for Cisco VPN with SBSetting with Jailbreak that might work for non-Cisco software (as in the built-in VPN) but as I haven't tested it it's hard to say :-) It may be that the blog mentions the built-in VPN but I can't verify it myself. It's not clear whether it mentions Cisco app or the built-in VPN (and just names it Cisco VPN).
"VPN-on-Demand" only works with one VPN protocol - IKEv2.
"VPN-on-Demand" is the only option to keep VPN "always on" for iOS.
Your VPN providers should offer IKEv2, and if they offer something else like OpenVPN - you won't get this "always on" option.
Also, IKEv2 is the only protocol that seamlessly continues to work when you switch from cellular network to wi-fi. Other VPN protocols will drop the VPN connection or endlessly will try to reconnect to the old network leaving you without internet.
One workaround: on a jailbroken device, use Activator to link "Lock Device" or "Unlock Device" to "Toggle VPN". Everytime I unlock it, it reconnects to my VPN :) so now I am happy