macos openvpn on demand

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
Ghost108
OpenVpn Newbie
Posts: 1
Joined: Mon Sep 07, 2020 12:54 pm

macos openvpn on demand

Post by Ghost108 » Mon Sep 07, 2020 1:02 pm

Hello :)

I created a profile with Apple Configurator 2 which allows me to use a openVPN connection on demand for iPhone.
It works on iPhone without a problem !

The same profile I would like to use for macos catalina.
I modified the profile a little bit: I replace the iphone openVPN Connect App ID with the ID from the macos openVPN Connect App.
After installation of the macos profile my network settings looks like this:

Image

The ID of the macOS openVPN App seams to be correct because it will shown the openVPN Connect as "VPN Programm" (VPN Software).
If I click on "Verinden" (Connect) nothing happens. I only get this output in the macos console:

Code: Select all

standard    13:42:48.374881+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Received a start command from com.apple.preference.network.re[701]
standard    13:42:48.375122+0200    nesessionmanager    Registering session NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]
standard    13:42:48.380419+0200    nesessionmanager    <NESMServer: 0x7f96afc06bf0>: Register Enterprise VPN Session: NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]
standard    13:42:48.380503+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Successfully registered
standard    13:42:48.387120+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: status changed to connecting
standard    13:42:48.387696+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)] in state NESMVPNSessionStateIdle: received start message
standard    13:42:48.388230+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Leaving state NESMVPNSessionStateIdle
standard    13:42:48.388308+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Entering state NESMVPNSessionStatePreparingNetwork
standard    13:42:48.389117+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Leaving state NESMVPNSessionStatePreparingNetwork
standard    13:42:48.389322+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Entering state NESMVPNSessionStateStarting
standard    13:42:48.389789+0200    nesessionmanager    NEVPNTunnelPlugin(org.openvpn.client.app[inactive]): Sending start command
standard    13:42:48.389942+0200    nesessionmanager    org.openvpn.client.app[inactive]: starting
fehler    13:42:48.394676+0200    nesessionmanager    org.openvpn.client.app[529]: Tearing down XPC connection due to setup error: Error Domain=NEAgentErrorDomain Code=2 "(null)"
standard    13:42:48.396794+0200    nesessionmanager    org.openvpn.client.app[529]: XPC connection went away
standard    13:42:48.399135+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)] in state NESMVPNSessionStateStarting: plugin NEVPNTunnelPlugin(org.openvpn.client.app[inactive]) started with PID 0 error Error Domain=NEAgentErrorDomain Code=2 "(null)"
standard    13:42:48.404098+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Leaving state NESMVPNSessionStateStarting
standard    13:42:48.404187+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Entering state NESMVPNSessionStateStopping, timeout 20 seconds
standard    13:42:48.404490+0200    nesessionmanager    <NESMServer: 0x7f96afc06bf0>: Request to uninstall session: NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]
standard    13:42:48.404568+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: status changed to disconnecting
standard    13:42:48.404756+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Updated network agent (inactive, compulsory, not-user-activiated, not-kernel-activated)
standard    13:42:48.405360+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Leaving state NESMVPNSessionStateStopping
standard    13:42:48.405595+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Entering state NESMVPNSessionStateDisposing, timeout 5 seconds
standard    13:42:48.405771+0200    nesessionmanager    org.openvpn.client.app[529]: disposing
standard    13:42:48.407324+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)] in state NESMVPNSessionStateDisposing: plugin NEVPNTunnelPlugin(org.openvpn.client.app[529]) dispose complete
standard    13:42:48.407500+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)] in state NESMVPNSessionStateDisposing: all plugins have disposed
standard    13:42:48.407957+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Leaving state NESMVPNSessionStateDisposing
standard    13:42:48.408169+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: Entering state NESMVPNSessionStateIdle
standard    13:42:48.408710+0200    nesessionmanager    NESMVPNSession[Primary Tunnel:SynologyVPN:43640959-727C-43C7-97F3-7015CA3A4944:(null)]: status changed to disconnected, last stop reason Plugin was disabled

Where is my mistake? Thanks !!!

MDobs
OpenVpn Newbie
Posts: 2
Joined: Mon Sep 14, 2020 7:28 am

Re: macos openvpn on demand

Post by MDobs » Mon Sep 14, 2020 7:29 am

Same issue, on iOS 13+ getting the exact same messages after:
`CONNECTED xxxxxxxxxxx:xportx (xxx.xxx.xx.xx) via /UDPv4 on NetworkExtensionTUN/xx.xx.xxx.x/ gw=[/]`

MDobs
OpenVpn Newbie
Posts: 2
Joined: Mon Sep 14, 2020 7:28 am

Re: macos openvpn on demand

Post by MDobs » Tue Sep 15, 2020 10:58 am

@Ghost108 the problem for me was having this: `-----BEGIN RSA PRIVATE KEY-----` instead of this: `-----BEGIN PRIVATE KEY-----` simply removing the RSA from the header fixed the issue. Someone would think such an error would need to be communicated more accurately...

Post Reply