macOS VPN Script support
I am trying to find a reliable way run a script which will automatically connect a macOS to our VPN. The user does have the ability to connect manually however there are cases where we need would like to automate this.
NON-Working Example
!/bin/bash
Connect to the VPN
"/Applications/WatchGuard/WatchGuard Mobile VPN with SSL.app"/Contents/Resources/openvpn --daemon --config /Users/ospadmin/VPN/client.ovpn --connect
Update Time with Domain Controller
systemsetup -setnetworktimeserver 10.10.0.13
systemsetup -setusingnetworktime on
Disconnect to the VPN
"/Applications/WatchGuard/WatchGuard Mobile VPN with SSL.app"/Contents/Resources/openvpn --daemon --config /Users/ospadmin/VPN/client.ovpn --disconnect
If anyone has recommendations please let me know.
0
Sign In to comment.
Comments
Hi @dowens81625
The SSLVPN app doesn't support scripting -- but it may work for you. I'd suggest that you look into the OpenVPN client (available at openvpn.net) which does allow the client itself to run a script after connecting.
-James Carson
WatchGuard Customer Support
Perhaps this:
Configure Tunnelblick on macOS to auto-connect on boot
https://privatevpnsupportguy.github.io/Configure Tunnelblick on macOS to auto-connect on boot.html