From 69614d7d501811164010a83441ea807716903cf1 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 20 Jul 2021 20:58:05 +0200 Subject: ipsec: T1210: add op-mode command for macOS and iOS profile generation generate ipsec mac-ios-profile remote will generate a matching IPSec profile which can be loaded on an iOS device. --- data/templates/ipsec/ios_profile.tmpl | 110 ++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 data/templates/ipsec/ios_profile.tmpl (limited to 'data') diff --git a/data/templates/ipsec/ios_profile.tmpl b/data/templates/ipsec/ios_profile.tmpl new file mode 100644 index 000000000..508f801d2 --- /dev/null +++ b/data/templates/ipsec/ios_profile.tmpl @@ -0,0 +1,110 @@ + + + + + PayloadDisplayName + {{ profile_name }} + + PayloadIdentifier + {{ rfqdn }} + + PayloadUUID + {{ 'random' | get_uuid }} + PayloadType + Configuration + PayloadVersion + 1 + PayloadContent + + + + + PayloadIdentifier + {{ rfqdn }}.conf1 + + PayloadUUID + {{ 'random' | get_uuid }} + PayloadType + com.apple.vpn.managed + PayloadVersion + 1 + + UserDefinedName + {{ vpn_name }} + VPNType + IKEv2 + IKEv2 + + + RemoteAddress + {{ remote }} + + RemoteIdentifier + {{ authentication.id if authentication.id is defined else 'fooo' }} + + LocalIdentifier + + + ServerCertificateIssuerCommonName + {{ ca_cn }} + + ServerCertificateCommonName + {{ cert_cn }} + + AuthenticationMethod + Certificate + + ExtendedAuthEnabled + 1 +{% if ike_proposal is defined and ike_proposal is not none %} + + IKESecurityAssociationParameters +{% for ike, ike_config in ike_proposal.items() %} + + + EncryptionAlgorithm + {{ ike_config.encryption | upper }} + + IntegrityAlgorithm + {{ ike_config.hash | upper }} + + DiffieHellmanGroup + {{ ike_config.dh_group | upper }} + +{% endfor %} +{% endif %} +{% if esp_proposal is defined and esp_proposal is not none %} + ChildSecurityAssociationParameters +{% for esp, esp_config in esp_proposal.items() %} + + EncryptionAlgorithm + {{ esp_config.encryption | upper }} + IntegrityAlgorithm + {{ esp_config.hash | upper }} + +{% endfor %} +{% endif %} + + + + + PayloadIdentifier + org.example.ca + PayloadUUID + {{ 'random' | get_uuid }} + PayloadType + com.apple.security.root + PayloadVersion + 1 + + PayloadContent + + {{ ca_cert }} + + + + + -- cgit v1.2.3