VPN on-demand after restarting the device

I've implemented a VPN app for iOS and macOS, using Packet Tunnel Provider.

I've set the VPN to be on-demand with on-demand rule to connect.

I tested it, and on my devices (Mac and iPhone) it works great - the VPN reconnects after sleep and after restarting the device.

But one of my customers reported that the VPN doesn't reconnects after restarting his Mac (but it does reconnect after exiting sleep).


I tried to find a documentation about it - is the VPN should reconnect after the device restart (assuming all on-demand rules are met)?

I saw it should for always-on VPNs, but I'm asking if it should do it for on-demand VPNs as well.

Answered by Systems Engineer in 424509022

If the requirements are met and the VPN has access to the needed authentication credentials, yes, the VPN should reconnect. If this is only happening on a few isolated customer machines on not on your larger user base then I would check what's different about these isolated cases. For example, when the VPN performs authentication, is there anything that shows up in the Console logs that identifies an issue getting credentials? Or possibly is there anything different about the network these isolated users are on when connecting? I would gather more info from these users and try and pick out what seems strange compared to a normal flow.



Matt Eaton

DTS Engineering, CoreOS

meaton3 at apple.com

Accepted Answer

If the requirements are met and the VPN has access to the needed authentication credentials, yes, the VPN should reconnect. If this is only happening on a few isolated customer machines on not on your larger user base then I would check what's different about these isolated cases. For example, when the VPN performs authentication, is there anything that shows up in the Console logs that identifies an issue getting credentials? Or possibly is there anything different about the network these isolated users are on when connecting? I would gather more info from these users and try and pick out what seems strange compared to a normal flow.



Matt Eaton

DTS Engineering, CoreOS

meaton3 at apple.com

Great, now that I know it should reconnect after restarting the device, I'll spend more time investigating this.

Thanks!

VPN on-demand after restarting the device
 
 
Q