Is it possible to tell the MacOS to not send (aka block/prohibit) network (WiFi) traffic until the VPN connects? When using non home WiFi I’d like the security of the VPN but many time my apps left open want to run immediately (email, browser, messaging, etc…) before the VPN has connected and encrypted the network traffic. Thanks!
There is an app called Lulu. It will allow you to block everything you want. However, this is not how consumer operating systems work. There are tons of services - some vital - some not, that are always going to try and ping something in the internet. I’m not saying it’s impossible, but the amount of work you’ll have to do, and continue to do after doing an upgrade with the os or app…well, you get where I’m going.
If you want something you can control more easily then Linux is an option.
You could also look into something like tail scale to tunnel back to your home network. I use that all the time, but there might be a few seconds or minutes where I’m on the tail scale network and just on the public WiFi.
I use ExpressVPN and it has a setting that will block all internet traffic if not connected to one of their servers. I never had to bother looking to do that with the OS.
MacOS, the original real Unix, is perfectly flexible.
I have a command script, batch file really, that executes just like a full blown app when I click on it.
It switches from regular network to vpn, changes all the relevant settings, etc.
It was not hard to write, took about 15mins to google where the settings I wanted to change were stored.
A script for your use case could be as simple as
Disable Wi-Fi
Enable vpn, wait for success
If vpn connected, re-enable wifi