Jun 20, 2014
VPN Configurations are among the few things not automatically
migrated by Migration Assistant when switching to a new Mac. As
Apple Consultants, we often have dozens of VPN connections to
client networks conveniently listed in the VPN menu. With one-click
access to client networks, we're ready to connect and provide
remote support at a moment's notice.
After successfully migrating to a new Mac, there's a certain
kind of "cobbler's kids" dread the first time you instinctively
reach for the VPN menu and find none of your familiar connections
Here's a quick-and-dirty Automator workflow I put together to
help migrate VPN configurations when switching to my new MacBook
Air a couple of years ago.
- Open System Preferences > Network, and click the lock to
authenticate if necessary.
- Select the first VPN connection in the service
- Click the gear below service list, and choose Export
- Select the "Export the default configuration" and "Include
items from the system keychain" checkboxes.
- Navigate to a folder of your choosing, or create one – this
folder will be used by the Automator workflow to save each of the
exported VPN configurations. Click Save.
Export VPN Configurations
- Download the Export
VPN Configurations Automator workflow and put the application
in your Dock (temporarily) to make it easier to access.
- Open the Export VPN Configurations app in your Dock. The
first time you open it, you will get an error that the action Watch
Me Do encountered an error. Open System Preferences > Security
& Privacy, and check the box on the Privacy tab to
allow Export VPN Configurations to control your computer.
- Make sure the second VPN connection is selected in
System Preferences > Network (you've already exported the first
one in the preparation steps above).
- Click the Export VPN Configurations app in your Dock to run
- After the workflow runs, the next VPN connection will be
selected automatically. Run the workflow again to export the next
VPN connection, and repeat until you've exported all of your VPN
Import VPN Configurations
Perhaps this could benefit from some automation, but I will
leave that as an exercise for the reader.
- Copy the folder where you saved your VPN configurations to your
- Open System Preferences > Network, and click lock to
authenticate if necessary.
- For each VPN configuration: Click the plus (+) below the
service list on the left, and add a new VPN interface with the
correct type (L2TP over IPSec, PPTP, or Cisco IPSec) and name it
accordingly, e.g. "Client A VPN (L2TP)."
- Open each VPN configuration file you copied to your new Mac,
and choose the corresponding interface you created in step 3.