4
2
The Problem:
I want to be able to use selected connections in different Location(by Location I mean Location combo in Mac Network Preferences). I want to be able to find a connection in Network Preferences while in a different location, in current available location and ideally in new connection that I might create in future by default.
What do you suggest as the best possible approach?
My Machine:
MacBook Pro
OS: 10.6.4
State:
I have 2 location that I created manually. "Home" and "Office", I have some some VPN connections that I want to use them in all location, currently in Home and Office but maybe later in Office2.
I can duplicate a location to contain same connections but I should apply needed changes manually after that for each location and also re-do it for any new changes in future.
Also I think I can create configurations for each connections and export and import them in different locations but seems not the best way.
Investigate Apple Configurator. Its a tool for both IOS and OS X that among other things lets you pre-define network stacks and settings. Haven;t used it for that purpose, but it could be the trick. – dave_the_dev – 2015-05-20T21:09:00.627
1This is going to be a tricky one, but I can tell you that the proper name for a connection (like built-in ethernet, or VPN) is a Network Service. You mention importing and exporting these network services--this might be the best way. I can't find anything in the manpages for networksetup for achieving this. I have also noticed that VPN network services can only exist in one location at a time. – NReilingh – 2010-08-07T16:27:04.207
Strange! I suppose there's no ideal solution as you said and what you mentioned seems the only possible way. Thanks. – Amir Latifi – 2010-08-07T19:24:40.153
1As NReilingh said, there exists no "easy" solution. Depending how much time you want to spend on this you could use the command line and AppleScript, but Cisco IPSec VPNs for example are very tricky to script. – Asmus – 2011-02-04T23:43:54.747