I have some bash scripts to connect my VPN but since Yosemite was installed they doesn't work anymore.

I tested directly on Terminal with and without sudo:

networksetup -connectpppoeservice "VPN"
networksetup -disconnectpppoeservice "VPN"

but nothing happens

  • I've rolled back your edit because including answers directly into the question makes it difficult for future visitors to find the information they are looking for. You can always post an answer to your own question though (and/or ask a new question for the part which still doesn't seem to work as it should).
    – nohillside
    Commented Nov 25, 2014 at 10:17

2 Answers 2


I had the some problem and a working solution like this:

Before Yosemite

networksetup -connectpppoeservice 'MY-VPN-SERVICE-NAME'

On Yosemite

scutil --nc start 'MY-VPN-SERVICE-NAME'

I found the hint on Robert's Blog http://roosbertl.blogspot.de/2014/10/auto-connect-osx-yosemite-ipsec-vpn-on.html

Works für IPSec and PPTP

  • For some reason, it seems to also be necessary to include --secret sharedsecret on the command line. Commented Sep 3, 2016 at 4:04

I set my Wifi to DHCP instead of static IP, then it worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .