I have probably been living under a rock for quite some time, but it turns out iOS Shortcuts (and MacOS) are pretty awesome, once you identify a proper use case for them. For me, the use case was simplifying connecting to my home, or work lab, network, via VPN.
Now, I am pretty sure I have looked into how to do this years ago, without finding a solution, but in case someone else might benefit from it, here is a walkthrough of creating a simple VPN toggle button on your iOS homescreen, i.e no more diving into settings to connect.
1. Toggle VPN connection Shortcut Button or Widget #
For some reason iOS does not provide a native VPN widget, or a way of quickly toggling a VPN connection without navigating into settings. Luckily iOS Shortcuts provide a way of doing that, which works very well. I have tested this for both “native” L2TP VPN connections, and Wireguard connections.
How to configure a VPN Toggle button on iOS #
Open the Shortcuts app and tap the “+” button in the upper-right corner.
Tap the arrow besides “New Shortcut", and select Rename and put in whatever you want to call it. I used “Toggle VPN (vpn name)”.
Tap on “Add Action” and search for “Set VPN”
By default the action for the Shortcut is “Connect”, which will connect to a VPN. In this case, I wanted a toggle switch to either connect or disconnect a VPN connection. Change this by tapping on “Connect” and change it to “Toggle”.
Tap on VPN to select which connection you want to use.
Tap the arrow besides your shortcut name again and select “Add to Home Screen”. This brings up a preview of the icon selected and name for the Shortcut. To add it to your home screen, tap on “Add” in the top right hand corner.
This adds the new toggle shortcut to your home screen, and it should now work like this:
A simple click to toggle the VPN connection. Nice!
Related Posts
- Fun and Games With WLED, ESP32, IKEA UPPLYST and Home Assistant — Published
- Down the Rabbit Hole With VMware Aria Automation Config @ Explore 2023 [VMTN2239BCN] — Published
- VMware Explore 2023 Barcelona Partner Leadership Forum — Published
- Updating Shodan Monitor Assets via REST API and Curl — Published
- VMware Explore 2023 Barcelona: My Sessions — Published