![vpn autoconnect download vpn autoconnect download](http://romascusoftware.com/vpn-auto-connect/images/hero-image.png)
Variations of this handy AppleScript have been around for ages and for a variety of purposes, and while here it demonstrates how to automatically connect to a VPN on login and reconnect to a VPN if it loses connection, it can be adjusted to perform other actions or automatically connect and reconnect to other services, including wi-fi or ethernet networks. Likewise, if the service is disconnected for some reason or another, it will attempt to reconnect to the VPN automatically.
![vpn autoconnect download vpn autoconnect download](https://whoer.net/images/guides/whoerapp-osx-en-2.png)
Now anytime you reboot the Mac or login after being logged out, the VPN service will connect automatically. Drag and drop the ‘AutoVPN’ AppleScript application you created into the Login Items section so that it loads automatically on login and system start.Choose the active user name, then select “Login Items”.Next go to the Apple menu and select “System Preferences” and go to the “Users & Groups” control panel.Now choose “Save” and give the VPN script and obvious name (like ‘AutoVPN’) and put it somewhere easy to locate, like the Desktop or users home directory.Under the ‘File Format’ pulldown menu, choose “Application”.Go to the “File” menu again and choose “Save”.Replace “VPN NAME” with the name of the accompanying VPN network location as found in System Preferences Network control panel (you can also change the return number to check the network more or less often, in seconds).If current configuration of myVPN is not connected then Tell current location of network preferences Copy and paste the following AppleScript syntax into the new blank script editor:.Open “Script Editor” on the Mac, it is found within the /Applications/Utilities/ folder.Essentially what we’re doing is placing a connection script into Login Items so that it loads automatically on system start and user login events:
Vpn autoconnect download mac os x#
This auto-connect VPN script should work on any version of macOS or Mac OS X system software. How to Connect to VPN on Boot or Login in Mac OS X, Automatically If you do not have or use a VPN (Virtual Private Network), then this trick will be of little use to a particular Mac. Obviously you’ll need an active VPN service and VPN location setup in Mac OS for this script to work, otherwise the script will have nothing to connect to upon login and system boot.