iOS VPN On Demand

Out of sheer boredom yesterday, I decided to play around with Apple Configurator on my wife’s Mac. Realizing I’m way late to this game, and piecing together what I could online, I managed to create an iOS profile that automatically connects my VPN when my phone can’t access my statically mapped “hubitat”, “ha”, “webcore”, or “zoneminder” hostnames, and automatically disconnects VPN and connects to my home SSID when available. Safari actually waits to load the page while the VPN connects, rather than just tell me “server not found”.

For anyone interested, start with the configurator (from the App Store), create a profile, add your VPN connection to the profile and then save. From there, open up the saved config file in a text editor and add your connect/disconnect rules. Then email/airdrop to your device and install.

I’ll gladly PM or post my rules section for anyone interested.

In my case, I am using L2TP IPsec on an edgerouter, but the configurator offers a dozen or more VPN options.

4 Likes