`scutil –nc start` not connecting PPPT VPN – OS X 10.11

command lineNetworkterminalvpn

From the answer to this question I have tried scutil --nc start 'us.justfreevpn.com' to connect a PPPT VPN, but all I get is the following popup:

popup

Frustratingly, if I manually start the connection from the menubar, I can then stop it using scutil --nc stop 'us.justfreevpn.com'

scutil --nc list gives the following:

Available network connection services in the current set (*=enabled):
* (Disconnected)   16DB05C1-0843-447F-9EA0-AD43139270AF PPP --> PPTP       "us.justfreevpn.com"             [PPP:PPTP]

And scutil --nc show 'us.justfreevpn.com' this:

* (Disconnected)   16DB05C1-0843-447F-9EA0-AD43139270AF PPP --> PPTP       "us.justfreevpn.com"             [PPP:PPTP]
PPP <dictionary> {
  ACSPEnabled : 1
  CCPEnabled : 1
  CommDisplayTerminalWindow : 0
  CommRedialCount : 1
  CommRedialEnabled : 0
  CommRedialInterval : 5
  CommUseTerminalScript : 0
  DialOnDemand : 0
  DisconnectOnFastUserSwitch : 1
  DisconnectOnIdle : 0
  DisconnectOnIdleTimer : 600
  DisconnectOnLogout : 1
  DisconnectOnSleep : 0
  IPCPCompressionVJ : 0
  IdleReminder : 0
  IdleReminderTimer : 1800
  LCPEchoEnabled : 1
  LCPEchoFailure : 15
  LCPEchoInterval : 20
  Logfile : /var/log/ppp.log
  VerboseLogging : 0
}

The log just shows the following:

Tue Feb 23 10:18:44 2016 : publish_entry SCDSet() failed: Success!
Tue Feb 23 10:18:44 2016 : publish_entry SCDSet() failed: Success!

And last exit code is 0:

$ echo $?
0

What am I doing wrong?

OS X 10.11.3

Best Answer

Was running into same issue. Ended up going the AppleScript route:

tell application "System Events"
        tell current location of network preferences
                set VPN to service "UniVPN" -- your VPN name here
                if exists VPN then connect VPN
                repeat while (current configuration of VPN is not connected)
                    delay 1
                end repeat
        end tell
end tell

(From https://superuser.com/a/358663/17760)