Page 1 of 1

Problems with creating iOS mobileconfig for openVPN

Posted: Thu Nov 30, 2017 10:29 pm
by Diablo_Vmax1200
Hi!

my connetion to the VPN on my Synology NAS is working fine by using to provided config in the openVPN App. But now I want to use the VPN on demand option nutzen so I hve to create a mobileconfig File.

Now I do have the Problem, that I can't get a connection with this file. Does anybody have an idea what's wrong with it?

Original Config File

Code: Select all

dev tun
tls-client
remote DOMAIN PORT
redirect-gateway def1
dhcp-option DNS 192.168.1.1
pull
proto tcp-client
script-security 2
comp-lzo
reneg-sec 0
cipher BF-CBC
auth SHA1
auth-user-pass
<ca>
-----BEGIN CERTIFICATE-----
xxxxxx
-----END CERTIFICATE-----
</ca>

The not working mobileconfig File, actually without VPN on demand

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ConsentText</key>
<dict>
<key>default</key>
<string>VPN on Demand Zugang zum Heimnetz.</string>
</dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IPv4</key>
<dict>
<key>OverridePrimary</key>
<integer>0</integer>
</dict>
<key>PayloadDescription</key>
<string>VPN-Einstellungen konfigurieren</string>
<key>PayloadDisplayName</key>
<string>VPN</string>
<key>PayloadIdentifier</key>
<string>com.apple.vpn.managed.60286514-CFAF-49EE-9FAF-5339F56F92C5</string>
<key>PayloadType</key>
<string>com.apple.vpn.managed</string>
<key>PayloadUUID</key>
<string>60286514-CFAF-49EE-9FAF-5339F56F92C5</string>
<key>PayloadVersion</key>
<integer>1</integer>
<key>Proxies</key>
<dict>
<key>HTTPEnable</key>
<integer>0</integer>
<key>HTTPSEnable</key>
<integer>0</integer>
</dict>
<key>UserDefinedName</key>
<string>Heim VPN</string>
<key>VPN</key>
<dict>
<key>AuthName</key>
<string>Home</string>
<key>AuthenticationMethod</key>
<string>Password</string>
<key>DisconnectOnIdle</key>
<integer>0</integer>
<key>OnDemandEnabled</key>
<integer>1</integer>
<key>RemoteAddress</key>
<string>firtz.box</string>
</dict>
<key>VPNSubType</key>
<string>net.openvpn.OpenVPN-Connect.vpnplugin</string>
<key>VPNType</key>
<string>VPN</string>
<key>VendorConfig</key>
<dict>
<key>auth</key>
<string>SHA1</string>
<key>auth-user-pass</key>
<string>USERNAME\nPASSWORD</string>
<key>ca</key>
<string>-----BEGIN CERTIFICATE-----\nxxxx\n-----END CERTIFICATE-----\n</string>
<key>cipher</key>
<string>BF-CBC</string>
<key>comp-lzo</key>
<string>NOARGS</string>
<key>dev</key>
<string>tun</string>
<key>dhcp-option</key>
<string>DNS 192.168.1.1</string>
<key>nobind</key>
<string>NOARGS</string>
<key>persist-key</key>
<string>NOARGS</string>
<key>persist-tun</key>
<string>NOARGS</string>
<key>proto</key>
<string>tcp-client</string>
<key>pull</key>
<string>NOARGS</string>
<key>remote</key>
<string>DOMAIN PORT</string>
<key>reneg-sec</key>
<string>0</string>
<key>resolv-retry</key>
<string>infinite</string>
<key>script-security</key>
<string>2</string>
</dict>
</dict>
</array>
<key>PayloadDisplayName</key>
<string>Hoimelig VPN Zugang</string>
<key>PayloadIdentifier</key>
<string>Michaels-MacBook-Pro.D5436157-FBB2-470E-A0A9-B8BDDBCFFED7</string>
<key>PayloadRemovalDisallowed</key>
<false/>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadUUID</key>
<string>04C0ED19-90B4-4108-A75E-A05FE659F342</string>
<key>PayloadVersion</key>
<integer>1</integer>
</dict>
</plist>
Thanks for your help.

Best regards
Michael