Thanks for your answer, its rely help to understand some things.
By the way, currently i've getting connecting... and disconnecting
on iOS
`return IKEv2Model(serverAddress: ip,
remoteIdentifier: ip,
localIdentifier: ip,
serverCertificateIssuerCommonName: ip,
useExtendedAuthentication: false,
ikeSecurityAssociationParametersEncryptionAlgorithm: .algorithmAES256,
ikeSecurityAssociationParametersDiffieHellmanGroup: .group14,
ikeSecurityAssociationParametersIntegrityAlgorithm: .SHA256,
ikeSecurityAssociationParametersLifetimeMinutes: 1410,
childSecurityAssociationParametersEncryptionAlgorithm: .algorithmAES128GCM,
childSecurityAssociationParametersDiffieHellmanGroup:.group14,
childSecurityAssociationParametersIntegrityAlgorithm: nil,
childSecurityAssociationParametersLifetimeMinutes: 1410,
deadPeerDetectionRate: .medium,
disableRedirect: true,
disableMOBIKE: false,
enableRevocationCheck: false,
enablePFS: false,
useConfigurationAttributeInternalIPSubnet: false,
disconnectOnSleep: false,
certificateType: .ECDSA256,
identityData: identityData!,
password: pass)`
where is
` let identityData = Data(base64Encoded: cert, options: .ignoreUnknownCharacters)
let options: NSDictionary = [kSecImportExportPassphrase: pass]
var items : CFArray?
let status: OSStatus = SecPKCS12Import(identityData! as NSData, options, &items)`
and
let cert = """
MIIQ9AIBAzCCELoGCSqGSIb3DQEHAaCCEKsEghCnMIIQozCCCPcG
CSqGSIb3DQEHBqCCCOgwggjkAgEAMIII3QYJKoZIhvcNAQcBMBwG
CiqGSIb3DQEMAQMwDgQIU9lsYPYNUzUCAggAgIIIsJz58NghTdos
...........
"
from PayloadContent of com.apple.security.pkcs12
and
this model is using for create
` #if os(iOS)
IKEv2Protocol.identityData = config.identityData
#else
IKEv2Protocol.identityReference = config.identityData
#endif
IKEv2Protocol.identityDataPassword = config.password`
currently i thing that possible certificate type is wrong, i've also tried RSA, but nothing
logs on the server side is the beggest for RCA but not helped to understand whats wrong, maybe you can give some advice please?
@eskimo
`2023-04-25T21:00:07.473671+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr #34: deleting incomplete state after 200 seconds
2023-04-25T21:00:07.473753+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr #34: deleting state (STATE_V2_PARENT_R1) aged 200.016332s and NOT sending notification
2023-04-25T21:00:07.594665+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr #35: deleting incomplete state after 200 seconds
2023-04-25T21:00:07.594710+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr #35: deleting state (STATE_V2_PARENT_R1) aged 200.004168s and NOT sending notification
2023-04-25T21:01:29.347037+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr #27: STATE_V2_ESTABLISHED_IKE_SA: 300 second timeout exceeded after 10 retransmits. No response (or no acceptable response) to our IKEv2 message
2023-04-25T21:01:29.347698+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr #27: liveness action - clearing connection kind CK_INSTANCE
2023-04-25T21:01:29.348127+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr #28: ESP traffic information: in=0B out=0B
2023-04-25T21:01:29.388964+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr #27: deleting state (STATE_V2_ESTABLISHED_IKE_SA) aged 543.259052s and NOT sending notification
2023-04-25T21:01:29.389123+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[8] MyIp adddr: deleting connection instance with peer MyIp adddr {isakmp=#0/ipsec=#0}
2023-04-25T21:06:48.525678+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[14] MyIp adddr #36: proposal 1:IKE=AES_CBC_256-HMAC_SHA2_256-HMAC_SHA2_256_128-MODP2048 chosen from remote proposals 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP2048[first-match]
2023-04-25T21:06:48.530929+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[14] MyIp adddr #36: sent IKE_SA_INIT reply {cipher=AES_CBC_256 integ=HMAC_SHA2_256_128 prf=HMAC_SHA2_256 group=MODP2048}
2023-04-25T21:06:48.644748+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[14] MyIp adddr #37: proposal 1:IKE=AES_CBC_256-HMAC_SHA2_256-HMAC_SHA2_256_128-MODP2048 chosen from remote proposals 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP2048[first-match]
2023-04-25T21:06:48.648190+00:00 ipsec-vpn-server pluto[482]: "ikev2-cp"[14] MyIp adddr #37: sent IKE_SA_INIT reply {cipher=AES_CBC_256 integ=HMAC_SHA2_256_128 prf=HMAC_SHA2_256 group=MODP2048}`