Disconnect on screen lock, and reconnect on unlock?
Posted: Wed Aug 15, 2018 10:49 am
Is there a way to disconnect VPN connections when the screen is locked, and reconnect when it is unlocked again?
I realize that is the opposite of what many people want (stay connected while locking the screen), but I have a VPN server that allows only a single connection (per user), so when I forget to disconnect on my work machine, I cannot connect to the server from my laptop or my home machine.
I know I can use Screen Sharing to do a remote login to the work machine to disconnect the VPN, but I would prefer if this was all automatic (the machine is always locked when I leave, and auto-locks after a time anyways).
I realize that is the opposite of what many people want (stay connected while locking the screen), but I have a VPN server that allows only a single connection (per user), so when I forget to disconnect on my work machine, I cannot connect to the server from my laptop or my home machine.
I know I can use Screen Sharing to do a remote login to the work machine to disconnect the VPN, but I would prefer if this was all automatic (the machine is always locked when I leave, and auto-locks after a time anyways).