{"id":4899,"date":"2015-01-06T21:38:17","date_gmt":"2015-01-06T20:38:17","guid":{"rendered":"http:\/\/blog.wenzlaff.de\/?p=4899"},"modified":"2021-11-22T17:15:07","modified_gmt":"2021-11-22T16:15:07","slug":"iphone-6-plus-vpn-on-demand-mit-ipsec-unter-ios-8-mit-shared-secret-moeglich","status":"publish","type":"post","link":"http:\/\/blog.wenzlaff.de\/?p=4899","title":{"rendered":"iPhone 6 plus: VPN on Demand mit IPSec unter iOS 8 mit \u201cshared secret\u201d m\u00f6glich"},"content":{"rendered":"<p>Wie kann mit einem iPhone automatisch eine VPN Verbindung hergestellt werden, ohne das man es immer manuell vorher anschalten muss? Also <strong>VPN on Demand<\/strong> mit IPSec und &#8222;schared secret&#8220;. Das ist hilfreich, wenn man in \u00f6ffentlichen WLANs unterwegs ist, so wird dann immer autom. eine VPN Verbindung aufgebaut, wenn sie ben\u00f6tigt wird. Es wird also nicht einmal vergessen. Und schon cool, wenn Anrufe auf dem Handy per VPN gef\u00fchrt werden k\u00f6nnen und Push-Benachrichtigungen autom. per VPN kommen.<br \/>\nUnd wie kann automatisch das VPN im eigenen bekannten WLAN und Hotspots deaktivert werden? Das alles mit einem orginal iPhone, es ist <strong>kein<\/strong> <a href=\"https:\/\/de.wikipedia.org\/wiki\/Jailbreak_%28iOS%29\" title=\"jailbreak\" target=\"_blank\" rel=\"noopener noreferrer\">Jailbreak<\/a> n\u00f6tig.<\/p>\n<p>Hatte vor einiger Zeit schon mal <a href=\"http:\/\/blog.wenzlaff.de\/?p=2456\" title=\"vpn\" target=\"_blank\" rel=\"noopener noreferrer\">versucht<\/a>, mit einem iPhone eine <strong>automatische VPN<\/strong> Verbindung (VPN on Demand) aufzubauen. Das hatte nicht geklappt, wie <a href=\"http:\/\/blog.wenzlaff.de\/?p=2456\" title=\"vpn\" target=\"_blank\" rel=\"noopener noreferrer\">hier<\/a> beschrieben, weil diese M\u00f6glichkeit im Apple Konfigurationsprogramm nicht angeboten wird. <\/p>\n<p>Habe jetzt aber einen Hinweis auf diese <a href=\"https:\/\/gist.github.com\/thomaswitt\/49f43777236279263364\" title=\"thomaswitt\" target=\"_blank\" rel=\"noopener noreferrer\">Quelle<\/a> von Thomas Witt erhalten (Danke). Damit klappt es super. Wie muss man vorgehen?<\/p>\n<p>1. Die <a href=\"https:\/\/gist.github.com\/thomaswitt\/49f43777236279263364\" title=\"vpn-template\" target=\"_blank\" rel=\"noopener noreferrer\">VPN_FritzBox_OnDemand.mobileconfig<\/a> laden.<br \/>\n2. Alle stellen die mit <strong>REPLACE<\/strong> gekennzeichnet sind, mit eigenen Werten ersetzen.<br \/>\n3. Die Profile Datei per E-Mail an das iPhone senden und das Profile installieren.<br \/>\n4. Manuell testen ob Verbindung l\u00e4uft.<\/p>\n<p>Habe es mit iPhone 6 Plus und iPadMini unter iOS 8.1.2 mit einer FritzBox 7490 (Version 06.23) getestet.<\/p>\n<p>Hier die n\u00f6tige Profile Datei von oben, mit Kommentaren von mir aus der Apple <a href=\"https:\/\/developer.apple.com\/go\/?id=configuration-profile-reference#\/\/apple_ref\/doc\/uid\/TP40010206\" title=\"apple-ref-command\" target=\"_blank\" rel=\"noopener noreferrer\">Referenz<\/a>, so kann man auf einem Blick sehen, was man anpassen kann bzw. muss:<\/p>\n<pre class=\"lang:default decode:true \" >&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\r\n&lt;!DOCTYPE plist PUBLIC \"-\/\/Apple\/\/DTD PLIST 1.0\/\/EN\" \"http:\/\/www.apple.com\/DTDs\/PropertyList-1.0.dtd\"&gt;\r\n&lt;!-- https:\/\/developer.apple.com\/library\/ios\/featuredarticles\/iPhoneConfigurationProfileRef\/Introduction\/Introduction.html#\/\/apple_ref\/doc\/uid\/TP40010206-CH1-SW7 --&gt;\r\n&lt;plist version=\"1.0\"&gt;\r\n        &lt;dict&gt;\r\n        &lt;!-- VPN Payload\r\n         The VPN payload is used for traditional systemwide VPNs based on L2TP, PPTP, and IPSec.\r\n         This payload should not be confused with the Per-App VPN, described in Per-App VPN Payload.\r\n         The VPN payload is designated by specifying com.apple.vpn.managed as the PayloadType value.\r\n         In addition to the settings common to all payload types, the VPN payload defines the following keys\r\n     --&gt;\r\n                &lt;key&gt;PayloadContent&lt;\/key&gt;\r\n                &lt;array&gt;\r\n                        &lt;dict&gt;\r\n                        &lt;!-- Determines the settings available in the payload for this type of VPN connection.  IPSec (Cisco) --&gt;\r\n                                &lt;key&gt;IPSec&lt;\/key&gt;\r\n                                &lt;dict&gt;\r\n                                     &lt;!-- Either SharedSecret or Certificate. Used for L2TP and Cisco IPSec. --&gt;\r\n                                        &lt;key&gt;AuthenticationMethod&lt;\/key&gt;\r\n                                        &lt;!-- The shared secret for this VPN account. Only present if AuthenticationMethod is SharedSecret. Used for L2TP and Cisco IPSec. --&gt;\r\n                                        &lt;string&gt;SharedSecret&lt;\/string&gt;\r\n                                        &lt;!-- 1 if the VPN connection should be brought up on demand, else 0. --&gt;\r\n                                        &lt;key&gt;OnDemandEnabled&lt;\/key&gt;\r\n                                        &lt;integer&gt;1&lt;\/integer&gt;\r\n                                        &lt;!-- Determines when and how an on-demand VPN should be used. --&gt;\r\n                                        &lt;key&gt;OnDemandRules&lt;\/key&gt;\r\n                                        &lt;array&gt;\r\n                                                &lt;dict&gt;\r\n                                                    &lt;!-- The action to take if this dictionary matches the current network. --&gt;\r\n                                                        &lt;key&gt;Action&lt;\/key&gt;\r\n                                                        &lt;!-- Disconnect\u2014Tear down the VPN connection and do not reconnect on demand as long as this dictionary matches. --&gt;\r\n                                                        &lt;string&gt;Disconnect&lt;\/string&gt;\r\n                                                        &lt;!-- An interface type. If specified, this rule matches only if the primary network interface hardware matches the specified type.\r\n                                                             Supported values are Ethernet, WiFi, and Cellular.\r\n                                                          --&gt;\r\n                                                        &lt;key&gt;InterfaceTypeMatch&lt;\/key&gt;\r\n                                                        &lt;string&gt;WiFi&lt;\/string&gt;\r\n                                                        &lt;!-- An array of SSIDs to match against the current network. If the network is not a Wi-Fi network or if the SSID does not appear in this array, the match fails.\r\n                                                             Omit this key and the corresponding array to match against any SSID.\r\n                                                          --&gt;\r\n                                                        &lt;key&gt;SSIDMatch&lt;\/key&gt;\r\n                                                        &lt;array&gt;\r\n                                                        &lt;!-- TODO: eine oder mehree Netzwerk SSID einf\u00fcgen --&gt;\r\n                                                                &lt;string&gt;REPLACE_secure_wpa2_network_ssid&lt;\/string&gt;\r\n                                                                &lt;string&gt;REPLACE_my_private_wpa_network_ssid&lt;\/string&gt;\r\n                                                        &lt;\/array&gt;\r\n                                                &lt;\/dict&gt;\r\n                                                &lt;dict&gt;\r\n                                                &lt;!-- The action to take if this dictionary matches the current network. --&gt;  \r\n                                                        &lt;key&gt;Action&lt;\/key&gt;\r\n                                                        &lt;!-- Connect \u2014 Unconditionally initiate a VPN connection on the next network attempt. --&gt;\r\n                                                        &lt;string&gt;Connect&lt;\/string&gt;\r\n                                                        &lt;!-- An interface type. If specified, this rule matches only if the primary network interface hardware matches the specified type.\r\n                                 Supported values are Ethernet, WiFi, and Cellular.\r\n                              --&gt;                                                        \r\n                                                        &lt;key&gt;InterfaceTypeMatch&lt;\/key&gt;\r\n                                                        &lt;string&gt;WiFi&lt;\/string&gt;\r\n                                                        &lt;!-- An array of SSIDs to match against the current network.\r\n                                                             If the network is not a Wi-Fi network or if the SSID does not appear in this array, the match fails.\r\n                                 Omit this key and the corresponding array to match against any SSID.\r\n                             --&gt;                                                        \r\n                                                        &lt;key&gt;SSIDMatch&lt;\/key&gt;\r\n                                                        &lt;array&gt;\r\n                                                            &lt;!-- TODO: evl. SSID f\u00fcr Hotspots oder Firma ergaenzen --&gt;\r\n                                                                &lt;string&gt;REPLACE_UNSECURE_PUBLIC_SSID&lt;\/string&gt;\r\n                                                                &lt;string&gt;REPLACE_Public&lt;\/string&gt;\r\n                                                                &lt;string&gt;REPLACE_Telekom&lt;\/string&gt;\r\n                                                        &lt;\/array&gt;\r\n                                                &lt;\/dict&gt;\r\n                                                &lt;dict&gt;\r\n                                                        &lt;key&gt;Action&lt;\/key&gt;\r\n                                                        &lt;string&gt;Connect&lt;\/string&gt;\r\n                                                        &lt;key&gt;InterfaceTypeMatch&lt;\/key&gt;\r\n                                                        &lt;string&gt;WiFi&lt;\/string&gt;\r\n                                                &lt;\/dict&gt;\r\n                                                &lt;dict&gt;\r\n                                                        &lt;key&gt;Action&lt;\/key&gt;\r\n                                                        &lt;!-- Ignore \u2014 Leave any existing VPN connection up, \r\n                                                              but do not reconnect on demand as long as this dictionary matches. \r\n                                                          --&gt;\r\n                                                        &lt;string&gt;Connect&lt;\/string&gt;\r\n                                                        &lt;key&gt;InterfaceTypeMatch&lt;\/key&gt;\r\n                                                        &lt;string&gt;Cellular&lt;\/string&gt;\r\n                                                &lt;\/dict&gt;\r\n                                                &lt;dict&gt;\r\n                                                        &lt;key&gt;Action&lt;\/key&gt;\r\n                                                        &lt;string&gt;Ignore&lt;\/string&gt;\r\n                                                &lt;\/dict&gt;\r\n                                        &lt;\/array&gt;\r\n                                        &lt;!-- Present only if AuthenticationMethod is SharedSecret.\r\n                                             The name of the group to use. If Hybrid Authentication is used,\r\n                                             the string must end with [hybrid]. Used for Cisco IPSec.\r\n                                             --&gt;\r\n                                        &lt;key&gt;LocalIdentifier&lt;\/key&gt;\r\n                                        &lt;!-- TODO: VPN Login eingeben --&gt;\r\n                                        &lt;string&gt;REPLACE_VPN_LOGIN&lt;\/string&gt;\r\n                                        &lt;!-- Present only if AuthenticationMethod is SharedSecret. The value is KeyID. Used for L2TP and Cisco IPSec. --&gt;\r\n                                        &lt;key&gt;LocalIdentifierType&lt;\/key&gt;\r\n                                        &lt;string&gt;KeyID&lt;\/string&gt;\r\n                                       \r\n                                        &lt;!-- IP address or host name of the VPN server. Used for Cisco IPSec. --&gt;\r\n                                        &lt;key&gt;RemoteAddress&lt;\/key&gt;                                        \r\n                                        &lt;!-- TODO: VPN Server eintragen z.B. xxxxxxxxxxxxxxxxx.myfritz.net oder DynDNS der Fritzbox --&gt;\r\n                                        &lt;string&gt;REPLACE_VPN_SERVER&lt;\/string&gt;\r\n                                        &lt;!-- The shared secret for this VPN account. Only present if AuthenticationMethod is SharedSecret. Used for L2TP and Cisco IPSec. --&gt;\r\n                                        &lt;key&gt;SharedSecret&lt;\/key&gt;\r\n                                        &lt;!-- TODO: shared secret f\u00fcr den VPN Account eingeben. z.B. Shared-Secret-Fritzbox-VPN-User-Config --&gt;\r\n                                        &lt;string&gt;REPLACE_SHARED_SECRET&lt;\/string&gt;\r\n                                       \r\n                                        &lt;!-- 1 if Xauth is on, 0 if it is off. Used for Cisco IPSec. --&gt;\r\n                                        &lt;key&gt;XAuthEnabled&lt;\/key&gt;\r\n                                        &lt;integer&gt;1&lt;\/integer&gt;\r\n                                        &lt;!-- User name for VPN account. Used for Cisco IPSec. --&gt;\r\n                                        &lt;key&gt;XAuthName&lt;\/key&gt;\r\n                                        &lt;!-- TODO VPN Login Name (Gruppenname) eingeben --&gt;\r\n                                        &lt;string&gt;REPLACE_VPN_LOGIN&lt;\/string&gt;\r\n                                        &lt;!-- Keine Doku zu den Parameter, evl. Xauth auf 0 setzen --&gt;\r\n                                        &lt;key&gt;XAuthPassword&lt;\/key&gt;\r\n                                        &lt;!-- TODO: VPN Passwort eingeben --&gt;\r\n                                        &lt;string&gt;REPLACE_VPN_PASSWORD&lt;\/string&gt;\r\n                                &lt;\/dict&gt;\r\n                                &lt;key&gt;IPv4&lt;\/key&gt;\r\n                                &lt;dict&gt;\r\n                                    &lt;!-- Specifies whether to send all traffic through the VPN interface. If true, all network traffic is sent over VPN. --&gt;\r\n                                        &lt;key&gt;OverridePrimary&lt;\/key&gt;\r\n                                        &lt;integer&gt;1&lt;\/integer&gt;\r\n                                &lt;\/dict&gt;\r\n                                &lt;!-- Optional. A description of the profile, shown on the Detail screen for the profile.\r\n                                     This should be descriptive enough to help the user decide whether to install the profile.\r\n                                  --&gt;\r\n                                &lt;key&gt;PayloadDescription&lt;\/key&gt;\r\n                                &lt;!-- TODO: Beschreibung eingeben --&gt;\r\n                                &lt;string&gt;Configures VPN settings&lt;\/string&gt;\r\n                                &lt;!-- Optional. A human-readable name for the profile. This value is displayed on the Detail screen. It does not have to be unique. --&gt;\r\n                                &lt;key&gt;PayloadDisplayName&lt;\/key&gt;\r\n                                &lt;!-- TODO: Beschreibung eingeben --&gt;\r\n                                &lt;string&gt;VPN&lt;\/string&gt;\r\n                                &lt;!-- A reverse-DNS style identifier (com.example.myprofile, for example) that identifies the profile.\r\n                                     This string is used to determine whether a new profile should replace an existing one or should be added.\r\n                                 --&gt;\r\n                                &lt;key&gt;PayloadIdentifier&lt;\/key&gt;\r\n                                &lt;!-- TODO: Eingeben --&gt;\r\n                                &lt;string&gt;REPLACE_UUID1.com.apple.vpn.managed.REPLACE_UUID2&lt;\/string&gt;\r\n                                &lt;!-- The VPN payload is designated by specifying com.apple.vpn.managed as the PayloadType value. --&gt;\r\n                                &lt;key&gt;PayloadType&lt;\/key&gt;                                \r\n                                &lt;string&gt;com.apple.vpn.managed&lt;\/string&gt;\r\n                                &lt;!-- A globally unique identifier for the payload.\r\n                                     The actual content is unimportant, but it must be globally unique.\r\n                                     In OS X, you can use uuidgen to generate reasonable UUIDs.\r\n                                  --&gt;\r\n                                &lt;key&gt;PayloadUUID&lt;\/key&gt;\r\n                                &lt;!-- TODO: UUID eingeben --&gt;\r\n                                &lt;string&gt;REPLACE_UUID2&lt;\/string&gt;\r\n                                &lt;!-- The version number of the individual payload. A profile can consist of payloads with different version numbers.\r\n                                     For example, changes to the VPN software in iOS might introduce a new payload version to support additional features,\r\n                                     but Mail payload versions would not necessarily change in the same release.\r\n                                  --&gt;\r\n                                &lt;key&gt;PayloadVersion&lt;\/key&gt;\r\n                                &lt;real&gt;1&lt;\/real&gt;\r\n                                &lt;key&gt;Proxies&lt;\/key&gt;\r\n                                &lt;dict \/&gt;\r\n                                &lt;!-- Description of the VPN connection displayed on the device. --&gt;\r\n                                &lt;key&gt;UserDefinedName&lt;\/key&gt;\r\n                                &lt;!-- TODO: Anpassen --&gt;\r\n                                &lt;string&gt;VPN OnDemand&lt;\/string&gt;\r\n                                &lt;!-- Determines the settings available in the payload for this type of VPN connection. IPSec (Cisco)... --&gt;\r\n                                &lt;key&gt;VPNType&lt;\/key&gt;\r\n                                &lt;string&gt;IPSec&lt;\/string&gt;\r\n                        &lt;\/dict&gt;\r\n                &lt;\/array&gt;\r\n               \r\n                &lt;!-- Payload Dictionary Keys Common to All Payloads\r\n             If a PayloadContent value is provided in a payload, each entry in the array is a dictionary representing a configuration payload.\r\n             The following keys are common to all payloads:\r\n          --&gt;\r\n                &lt;!-- Optional. A human-readable name for the profile payload. This name is displayed on the Detail screen. It does not have to be unique. --&gt;\r\n                &lt;key&gt;PayloadDisplayName&lt;\/key&gt;\r\n                &lt;!-- TODO: Anpassen --&gt;\r\n                &lt;string&gt;VPN OnDemand&lt;\/string&gt;\r\n                &lt;!-- A reverse-DNS-style identifier for the specific payload.\r\n                     It is usually the same identifier as the root-level PayloadIdentifier value with an additional component appended.\r\n                  --&gt;\r\n                &lt;key&gt;PayloadIdentifier&lt;\/key&gt;\r\n                &lt;!-- TODO: UUID eingeben --&gt;\r\n                &lt;string&gt;REPLACE_UUID1&lt;\/string&gt;\r\n                &lt;!-- Optional. If present and set to true, the user cannot delete the profile (unless the profile has a removal password and the user provides it). --&gt;\r\n                &lt;key&gt;PayloadRemovalDisallowed&lt;\/key&gt;\r\n                &lt;false \/&gt;\r\n                &lt;!-- The only supported value is Configuration. --&gt;\r\n                &lt;key&gt;PayloadType&lt;\/key&gt;\r\n                &lt;string&gt;Configuration&lt;\/string&gt;\r\n                &lt;!-- A globally unique identifier for the payload.\r\n                     The actual content is unimportant, but it must be globally unique.\r\n                     In OS X, you can use uuidgen to generate reasonable UUIDs.  \r\n                  --&gt;\r\n                &lt;key&gt;PayloadUUID&lt;\/key&gt;\r\n                &lt;!-- TODO: UUID einf\u00fcgen --&gt;\r\n                &lt;string&gt;REPLACE_UUID3&lt;\/string&gt;\r\n                &lt;!-- The version number of the individual payload.\r\n             A profile can consist of payloads with different version numbers.\r\n             For example, changes to the VPN software in iOS might introduce a new payload version to support additional features,\r\n             but Mail payload versions would not necessarily change in the same release.\r\n          --&gt;\r\n                &lt;key&gt;PayloadVersion&lt;\/key&gt;\r\n                &lt;integer&gt;1&lt;\/integer&gt;\r\n        &lt;\/dict&gt;\r\n&lt;\/plist&gt; <\/pre>\n<p>In welcher Umbebung l\u00e4uft es bei Euch? Oder einfach nur einen like hinterlassen.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Wie kann mit einem iPhone automatisch eine VPN Verbindung hergestellt werden, ohne das man es immer manuell vorher anschalten muss? Also VPN on Demand mit IPSec und &#8222;schared secret&#8220;. Das ist hilfreich, wenn man in \u00f6ffentlichen WLANs unterwegs ist, so wird dann immer autom. eine VPN Verbindung aufgebaut, wenn sie ben\u00f6tigt wird. Es wird also &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/blog.wenzlaff.de\/?p=4899\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eiPhone 6 plus: VPN on Demand mit IPSec unter iOS 8 mit \u201cshared secret\u201d m\u00f6glich\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[220,229,214,254,1101,1319],"tags":[1896,1894,1046,1895,1892,1890,1891,1893,989,1187],"class_list":["post-4899","post","type-post","status-publish","format-standard","hentry","category-anleitung","category-imac-2","category-ipad","category-os-x-2","category-reisen","category-sicherheit-2","tag-1896","tag-fb","tag-fritzbox","tag-fritzbox-7940","tag-ios-8","tag-iphone-6-plus","tag-ipsec","tag-shared-secret","tag-vpn","tag-vpn-on-demand"],"_links":{"self":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/4899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4899"}],"version-history":[{"count":0,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=\/wp\/v2\/posts\/4899\/revisions"}],"wp:attachment":[{"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4899"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.wenzlaff.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}