Usually when you wake up your MacBook, macOS automatically establishes e.g. IMAP or various background sync connections. How can I make sure that all traffic is sent over to VPN connection BEFORE I connect to wifi or my VPN connection fails?
I am using Apple’s built-in VPN client in OS X 10.12. VPN service order is set prior wifi in the OS X Network location. Also, the checkbox for for „Send all traffic over VPN connection“ is enabled.
Best Answer
According to an article by How-To Geek How to Connect Your Mac to Any VPN (and Automatically Reconnect), there is an app that can do this for you, but first:
However, the article also says:
VPN AutoConnect by Nova-box is the app the article talks about, but it does not have a very good rating, so I am not sure if it would benefit you.
I use a VPN, but I am not using Apple's client for this. I use the VPN's client. I did download it from the App Store, and it has been great thus far—there is a feature that allows you to prevent any traffic from running until the VPN is up and running.
The VPN I have is VPN Unlimited - WiFi Proxy. I purchased a lifetime subscription for around $20 from Cult Of Mac when they had a special on it.
There could be Terminal commands for this as well. I have found this other Ask Different question for you to take a look at: Where is the "Send all traffic over VPN connection" setting in OSX 10.9 Mavericks?
This last link to a Tuts+ article How to Use VPN on Your Mac is basically what you said you already did, from my understanding, but I thought it might be useful in case you wanted to double check your steps (since I haven't used the Apple client, I can't speak for it, hence this link).
Good luck!