Wechseln zu:Navigation, Suche
Wiki
KKeine Bearbeitungszusammenfassung
 
(22 dazwischenliegende Versionen von einem anderen Benutzer werden nicht angezeigt)
Zeile 1: Zeile 1:
{{DISPLAYTITLE:Einbinden von individuellen openVPN-Profilen in iOS}}
{{Set_lang}}
== Informationen ==
Es gibt mehrere Wege eine individuelle openVPN-Konfig zu importieren
* einen .tblk Ordner mit allen benötigten Dateien
* eine .mobilconfig-Datei für den Import in das Konfigurationsporfil von iOS
<br>
Beide Wege werden im Folgenden beschrieben.


== How to set up a .tblk folder ==
{{#vardefine:headerIcon|spicon-mobile-security}}


# Create a folder @example.tblk@
{{:MS/onboarding/ios/vpnconfig.lang}}
# The folder has to contain the following items:
## ca.crt
## client.crt
## client.key
## config.ovpn
## (optional) pass.txt


You can name the folder as you like, but it is important to keep these filenames inside the folder.


== Template for ca.crt ==
</div>{{DISPLAYTITLE:{{#var:display}} }}{{Select_lang}}{{TOC2}}
 
'''{{#var:head}}'''
 
 
{{cl| {{#var:neu}} | {{#var:neu--Artikel}} }}
 
 
{{#var:ver-d}} '''12.2020'''
 
 
 
<div class="h3"> {{#var:Vorbemerkung}} </div>
{{#var:Vorbemerkung--desc}}
 
=== {{#var:Konfigurationsordner}} ===
{{#var:Konfigurationsordner--desc}}
 
<li class="list--element__alert list--element__hint">{{#var:Konfigurationsordner--Hinweis}}</li>
 
==== {{#var:Templates}} ====
{{#var:Templates--desc}}
<div class="Einrücken">
 
{{h5 | {{#var:Certificate Authority}} | {{#var:Certificate Authority-h5}} }}


<pre>
<pre>
Zeile 31: Zeile 42:
</pre>
</pre>


=== Template for client.crt ===
{{h5 | {{#var:Client Zertifikat}} | {{#var:Client Zertifikat-h5}} }}


<pre>
<pre>
Zeile 43: Zeile 54:
</pre>
</pre>


=== Template for client.key ===
{{h5| {{#var:Client Zertifikat}} | {{#var:Client Zertifikat-h5}} }}


<pre>
<pre>
Zeile 54: Zeile 65:
</pre>
</pre>


=== Template for config.ovpn ===
{{h5| {{#var:Konfigurationsdatei}} | {{#var:Konfigurationsdatei-h5}} }}


<pre>
<pre>


remote your.server.com 443 tcp
remote {your.server.com} 443 tcp
route {ip to exclude from vpn} 255.255.255.255 net_gateway
route {ip to route into tunnel} 255.255.255.255 vpn_gateway
dhcp-option DNS 192.168.123.1
dhcp-option DNS 192.168.123.1


Zeile 69: Zeile 80:
</pre>
</pre>


== Template for pass.txt ==
{{h5| {{#var:Passwortdatei}} | {{#var:Passwortdatei-h5 }} }}


<pre>
<pre>
Zeile 76: Zeile 87:
</pre>
</pre>


</div>


== How to import a .tblk folder ==
===== {{#var:Konfigurationsordner}} =====
<div class="Einrücken">


# Open Finder on your Mac and copy the .tblk folder to your iCloud folder.
===== {{#var:Import--iCloud}} =====
## The .tblk extension is important, because the device has to recognize the folder as a single file (package)
<div class="Einrücken">
## If you use the iCloud web app, it automatically creates a .zip from the folder. This will not work
{{#var:Import--iCloud--desc}}
## If you send yourself the folder per E-Mail, make sure your client does not create a .zip from the folder. (i.e. the GMail web app does this)
<li class="list--element__alert list--element__positiv">{{#var:Import--Hinweis}}</li>


# Inside Securepoint Mobile Security open the VPN Status Page and click "Add config"
</div>
# Go back to the menu and select "Profile Management"
===== {{#var:Import--Configurator}} =====
# Select the profile and click "start VPN"
<div class="Einrücken">


== How to setup a .mobileconfig ==
{{#var:Import--Configurator--desc}}
<li class="list--element__alert list--element__positiv">{{#var:Import--Hinweis}}</li>
</div>


Use the following template and replace all occurrences of {...} with the relevant information of your VPN setup.
</div>
----


<pre>
=== {{#var:mobileconfig-Datei}} ===
<dict>
{{#var:mobileconfig-Datei--desc}}
 
==== Template ====
<div class="Einrücken">
<dict>
     <key>PayloadContent</key>
     <key>PayloadContent</key>
     <array>
     <array>
Zeile 122: Zeile 142:
         </dict>
         </dict>
         <key>UserDefinedName</key>
         <key>UserDefinedName</key>
         <string>{Insert any identifier}</string>
         <string>{{c|{Insert any identifier}|r}}</string>
         <key>VPN</key>
         <key>VPN</key>
         <dict>
         <dict>
Zeile 150: Zeile 170:
         <dict id="vendorConfig">
         <dict id="vendorConfig">
           <key>auth-user-pass</key>
           <key>auth-user-pass</key>
           <string>{username}\n{password}</string>
           <string>{{c|{username}|r}}\n{{c|{password}|r]]</string>
           <key>ca</key>
           <key>ca</key>
           <string>-----BEGIN CERTIFICATE-----\nMIIEKTCCAxGgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBrjELMAkGA1....{ The CA certificate which signed the VPN server Certificate }....hj/AA+dCIFEzp2EtIuK3K6Jtu\nlEAa+0y24V6nS/L9/g==\n-----END CERTIFICATE-----\n</string>
           <string>-----BEGIN CERTIFICATE-----\n{{c|{MIIEKTCCAxGgAwIBAgIBAD.... The CA certificate which signed the VPN server Certificate ....0y24V6nS/L9/g&#61;&#61;}|r}}\n-----END CERTIFICATE-----\n</string>
           <key>remote.1</key>
           <key>remote.1</key>
           <string>{VPN server hostname} {VPN server port}</string>  
           <string>{{c|{VPN server hostname} {VPN server port}|r}}</string>  
           <key>proto.1</key>
           <key>proto.1</key>
           <string>{VPN server protocol (udp or tcp)}</string>
           <string>{{c|{VPN server protocol (udp or tcp)}|r}}</string>
           <key>redirect-gateway</key>
           <key>redirect-gateway</key>
           <string>def1</string>
           <string>def1</string>
Zeile 173: Zeile 193:
         <string>Client Certificate</string>
         <string>Client Certificate</string>
         <key>PayloadContent</key>
         <key>PayloadContent</key>
         <data>MIIPsQIBAzCCD2oGCSqGSIb3DQEHAaCCD1sE{ Client Certificate in PKCS12 format }BgUrDgMCGgUABBSHgcVUxAYiLs91uoElN78YtI0rIwQU3/s72Orxrvp86coUpLfEEheyrqcCAwGGoA==</data>
         <data&gt;{{c|{MIIPsQIBAzCCD... Client Certificate in PKCS12 format ...pLfEEheyrqcCAwGGoA&#61;&#61;}|r}}</data&gt;
         <key>PayloadDisplayName</key>
         <key>PayloadDisplayName</key>
         <string>Client Certificate</string>
         <string>Client Certificate</string>
Zeile 185: Zeile 205:
         <integer>1</integer>
         <integer>1</integer>
         <key>Password</key>
         <key>Password</key>
         <string>{Password to access the PKCS12 container}</string>
         <string>{{c|{Password to access the PKCS12 container}|r}}</string>
         <key>PayloadDescription</key>
         <key>PayloadDescription</key>
         <string>Adds a PKCS12-formatted certificate</string>
         <string>Adds a PKCS12-formatted certificate</string>
Zeile 191: Zeile 211:
     </array>
     </array>
     <key>PayloadDisplayName</key>
     <key>PayloadDisplayName</key>
     <string>{Identifier in IOS settings for the certificate}</string>
     <string>{{c|{Identifier in IOS settings for the certificate}|r}}</string>
     <key>PayloadIdentifier</key>
     <key>PayloadIdentifier</key>
     <string>vpn.configuration</string>
     <string>vpn.configuration</string>
Zeile 201: Zeile 221:
     <integer>1</integer>
     <integer>1</integer>
   </dict>
   </dict>
</plist>
</plist>
</pre>
</div>
 
==== {{#var:mobileconfig-Datei--Import}} ====
<div class="Einrücken">
 
===== {{#var:Import--iCloud}}=====
 
<div class="Einrücken">
{{#var:mobileconfig-Datei--Import--icloud--desc}}
</div>
 
===== {{#var:Import--Configurator}} =====
 
<div class="Einrücken">
{{#var:mobileconfig-Datei--Import--Configurator--desc}}
</div>


== How to import a .mobileconfig ==
===== {{#var:mobileconfig-Datei--Import--MDM}} =====


* Deploy it with an MDM server
<div class="Einrücken">
* You can add one to your device using the Apple Configurator2
{{#var:mobileconfig-Datei--Import--MDM--desc}}
* Download it using iCloud
</div>
** If you downloaded it via iCloud, you have to select it in your files browser and import it into the system
</div>

Aktuelle Version vom 4. Dezember 2020, 10:36 Uhr






























De.png
En.png
Fr.png

Einbinden von individuellen openVPN-Profilen in iOS


Neu:

Neuer Artikel


Letzte Anpassung: 12.2020


Vorbereitung & Auswahl

Es gibt mehrere Wege eine individuelle OpenVPN-Konfiguration zu importieren:

  • einen Konfigurationsordner mit allen benötigten Dateien
  • eine .mobilconfig-Datei als Konfigurationsprofil


Beide Wege werden im Folgenden beschrieben.

Konfigurationsordner

1. Es muss ein neuer Ordner erstellt werden
2. Der Ordner muss folgende Dateien enthalten:

  • Certificate Authority ca.crt
  • Client Zertifikat client.crt
  • Client Zertifikat Private Key client.key
  • Konfigurationsdatei config.ovpn
  • (optional) Passwortdatei pass.txt

3. Der Ordner muss als .zip komprimiert werden

  • Der Ordner und die Dateien können frei benannt werden, lediglich die Konfigurationsdatei benötigt die Endung .ovpn.
  • Templates

    Im Folgenden finden sich Templates für alle benötigten Dateien:

    Certificate Authority ca.crt
    Template für Certificate Authority ca.crt
    -----BEGIN CERTIFICATE-----
    MIIEKTCCAxGgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UEBhMCREUx
    ...
    HqrtWy/eXrvxBk5cqsjMsiid7KYZqGxQeli9aQBByMXLD+W+5zV/EOZ3q0eXGUUY
    JFnpVtR5miRxSVYMqq8JlrdYMPcjKhcf3WSru/Shj/AA+dCIFEzp2EtIuK3K6Jtu
    lEAa+0y24V6nS/L9/g==
    -----END CERTIFICATE-----
    
    Client Zertifikat Private Key client.key
    Template für Client Zertifikat Private Key client.key
    -----BEGIN CERTIFICATE-----
    MIIDcTCCAlmgAwIBAgIQYPOoN8oxQJWEuJgFzrQbIDANBgkqhkiG9w0BAQsFADCB
    rjELMAkGA1UEBhMCREUxFjAUBgNVBAgMDU5pZWRlcnNhY2hzZW4xEjAQBgNVBAcM
    ...
    laXtTQtA4IdGFStIM0srNe81F611kvaJLu71J9ar4Qvndo2RzhkXt/4zVgsaDzhP
    Zq2NuIvXEHzO/tNjJZDVA/dgfOXd
    -----END CERTIFICATE-----
    
    Client Zertifikat Private Key client.key
    Template für Client Zertifikat Private Key client.key
    -----BEGIN PRIVATE KEY-----
    MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCjZZtl4wlvv9Th
    ...
    CtpYImI8O795Bwn2HABjYufe3iDNrc418P5Sdem/dIOV4YvNTPTaS/kgCY7xMQ8N
    JNAkJ4lGIfi4AREvV7Y/pg4=
    -----END PRIVATE KEY-----
    
    Konfigurationsdatei config.ovpn
    Template für Konfigurationsdatei config.ovpn
    
    remote {your.server.com} 443 tcp
    route {ip to route into tunnel} 255.255.255.255 vpn_gateway
    dhcp-option DNS 192.168.123.1
    
    dev tun
    cipher AES-128-CBC
    auth SHA256
    tun-mtu 1500
    persist-key
    
    Passwortdatei pass.txt (optional)
    Template für Passwortdatei pass.txt (optional)
    username
    password
    
    Konfigurationsordner
    über iCloud
    • Finder auf dem Mac öffnen und kopieren der erstellten .zip-Datei in den iCloud-Ordner.
    • In der Securepoint Mobile Security App: Öffnen des Menüs Profile und klicken auf das „Plus“ Symbol
    • Auswahl der .zip-Datei im iCloud-Ordner
  • (Die .zip Datei kann direkt importiert werden, ohne diese vorher zu entpacken.)
  • über den Apple Configurator 2
    • Verbinden des Gerätes mit einem Kabel an einen Mac
    • Öffnen des Apple Configurator 2
    • Bewegen der erstellten .zip-Datei mit der Maus auf das angezeigte Gerät im Apple Configurator 2
    • Wählen des Ordners Securepoint VPN Client
    • In der Securepoint Mobile Security App: Öffnen des Menüs Profile und klicken auf das „Plus“ Symbol
    • Auswahl der .zip-Datei im Securepoint VPN Client Ordner
  • (Die .zip Datei kann direkt importiert werden, ohne diese vorher zu entpacken.)

  • .mobileconfig-Datei

    Im folgenden Template müssen die Platzhalter {...} mit den individuell relevanten Informationen ersetzt werden. Anschließend wird diese Datei in das Gerät importiert.

    Template

    <dict>
       <key>PayloadContent</key>
       <array>
         <dict>
           <key>IPv4</key>
           <dict>
             <key>OverridePrimary</key>
             <integer>0</integer>
           </dict>
           <key>PayloadDescription</key>
           <string>Configures VPN settings</string>
           <key>PayloadDisplayName</key>
           <string>VPN</string>
           <key>PayloadIdentifier</key>
           <string>com.apple.vpn.managed.5313ec66-a3c0-422c-932d-ef4d4ebb3b18</string>
           <key>PayloadType</key>
           <string>com.apple.vpn.managed</string>
           <key>PayloadUUID</key>
           <string>5313ec66-a3c0-422c-932d-ef4d4ebb3b18</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>{Insert any identifier}</string>
           <key>VPN</key>
           <dict>
             <key>AuthenticationMethod</key>
             <string>Certificate</string>
             <key>PayloadCertificateUUID</key>
             <string>5e2de92b-4b5f-4bfd-8074-47bad6c64183</string>
             <key>DisconnectOnIdle</key>
             <integer>0</integer>
             <key>OnDemandEnabled</key>
             <integer>1</integer>
             <key>OnDemandRules</key>
             <array>
               <dict>
                 <key>Action</key>
                 <string>Connect</string>
               </dict>
             </array>
             <key>RemoteAddress</key>
             <string>DEFAULT</string>
           </dict>
           <key>VPNSubType</key>
           <string>de.securepoint.ms.agent</string>
           <key>VPNType</key>
           <string>VPN</string>
           <key>VendorConfig</key>
           <dict id="vendorConfig">
             <key>auth-user-pass</key>
             <string>{username}\n{{c|{password}|r]]</string>
             <key>ca</key>
             <string>-----BEGIN CERTIFICATE-----\n{MIIEKTCCAxGgAwIBAgIBAD.... The CA certificate which signed the VPN server Certificate ....0y24V6nS/L9/g==}\n-----END CERTIFICATE-----\n</string>
             <key>remote.1</key>
             <string>{VPN server hostname} {VPN server port}</string> 
             <key>proto.1</key>
             <string>{VPN server protocol (udp or tcp)}</string>
             <key>redirect-gateway</key>
             <string>def1</string>
             <key>dev</key>
             <string>tun</string>
             <key>cipher</key>
             <string>AES-128-CBC</string>
             <key>auth</key>
             <string>SHA256</string>
             <key>tun-mtu</key>
             <string>1500</string>
           </dict>
         </dict>
         <dict>
           <key>PayloadCertificateFileName</key>
           <string>Client Certificate</string>
           <key>PayloadContent</key>
           <data>{MIIPsQIBAzCCD... Client Certificate in PKCS12 format ...pLfEEheyrqcCAwGGoA==}</data>
           <key>PayloadDisplayName</key>
           <string>Client Certificate</string>
           <key>PayloadIdentifier</key>
           <string>Client Certificate</string>
           <key>PayloadType</key>
           <string>com.apple.security.pkcs12</string>
           <key>PayloadUUID</key>
           <string>5e2de92b-4b5f-4bfd-8074-47bad6c64183</string>
           <key>PayloadVersion</key>
           <integer>1</integer>
           <key>Password</key>
           <string>{Password to access the PKCS12 container}</string>
           <key>PayloadDescription</key>
           <string>Adds a PKCS12-formatted certificate</string>
         </dict>
       </array>
       <key>PayloadDisplayName</key>
       <string>{Identifier in IOS settings for the certificate}</string>
       <key>PayloadIdentifier</key>
       <string>vpn.configuration</string>
       <key>PayloadType</key>
       <string>Configuration</string>
       <key>PayloadUUID</key>
       <string>a4d7f358-f9a3-42e2-8083-5b26cccab6e2</string>
       <key>PayloadVersion</key>
       <integer>1</integer>
     </dict>
    </plist>
    

    Import einer .mobileconfig-Datei

    über iCloud
    • Finder auf dem Mac öffnen und kopieren der erstellten .mobileconfig-Datei in den iCloud-Ordner.
    • Öffnen des iCloud-Ordners auf dem Gerät und importieren der .mobileconfig-Datei.
    über den Apple Configurator 2
    • Verbinden des Gerätes mit einem Kabel an einen Mac
    • Öffnen des Apple Configurator 2
    • Bewegen der erstellten .mobileconfig-Datei mit der Maus auf das angezeigte Gerät im Apple Configurator 2
    • Die Konfiguration wird automatisch umgesetzt
    über einen MDM-Server
    • Dieser Vorgang unterscheidet sich abhängig vom MDM-Hersteller. Hierfür ist die entsprechende Dokumentation zu prüfen.