How to fix VPN on MacOS Sonoma
Apple recently broke its IKEv2 client in MacOS Sonoma.
Symptoms are: vpn is disconnected every 25 minutes or so. The internet is full of bug reports and long discussions like this one.
As of MacOS 14.2.1 there's no fix for this.
Hopefully Alexey can help.
- Open Shortcuts app.
- Create new shortcut like this one. Put name of your VPN connection in the "VPN" field of the command.
- Run the command. You can even run it from the menu bar. The command will run (essentially) indefinitely.
You can play with sleep amount to tune your connection restore time vs battery and CPU usage.
- Now your VPN connection is restored every time it breaks. The command takes ~20% CPU on my machine, but it seems like a good tradeoff for working around OS bug.