VPN connection customization

New Contributor

Hi Folks,

I have a requirement to create VPN connection at 200 Macs which I'm able to do so via Configuration Profiles. However I also need to make sure below two settings must be applied along with VPN connection

  1. Checkbox for "Show VPN status in menu bar" must be checked
  2. Under VPN connection, I need to configure “search domains” section under DNS tab.

I tried using composer however it is unable to capture the changes done under DNS search domains section irrespective of the Composer method. Although It picked up VPN status menu bar setting however it is overwriting the icons which are already present in menu bar. My requirement is just to add VPN icon in menu bar without touching their existing icons in menu bar.

If you need any further information then please let me know.

Any assistance to achieve this would be appreciated.



New Contributor II

For adding VPN to the menubar look at https://jamfnation.jamfsoftware.com/discussion.html?id=9745

Adding a search domain can be done using, where VPN is the name of your networkservice.


networksetup -setsearchdomains VPN legacydomain.com secondlegacydomain.com additionaldomain.org evenmoresearchdomain.net

New Contributor

Many thanks, I'll give it a shot & get back to you.

New Contributor


I tried running below commands manually but it is still not adding VPN icon in menu bar. Mac OS is 10.9.5

defaults write com.apple.systemuiserver menuExtras -array-add "/System/Library/CoreServices/Menu Extras/vpn.menu"

killall SystemUIServer -HUP

Anything which I missing here?


Contributor III

Just posted this as I noticed a couple of VPN questions lately, hope it helps.


- Justin