Options

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.

Comments

Sign In to comment.