022-07-21T23:37:23 Informational charon 14[NET] <con9|38> sending packet: from 202.202.202.202[4500] to 101.101.101.101[10673] (80 bytes) 2022-07-21T23:37:23 Informational charon 14[ENC] <con9|38> generating IKE_AUTH response 9 [ EAP/FAIL ] 2022-07-21T23:37:23 Informational charon 14[IKE] <con9|38> EAP method EAP_TLS failed for peer GregsiPhone.domain.local 2022-07-21T23:37:23 Informational charon 14[ENC] <con9|38> parsed IKE_AUTH request 9 [ EAP/RES/TLS ] 2022-07-21T23:37:23 Informational charon 14[NET] <con9|38> received packet: from 101.101.101.101[10673] to 202.202.202.202[4500] (112 bytes) 2022-07-21T23:37:23 Informational charon 14[NET] <con9|38> sending packet: from 202.202.202.202[4500] to 101.101.101.101[10673] (96 bytes) 2022-07-21T23:37:23 Informational charon 14[ENC] <con9|38> generating IKE_AUTH response 8 [ EAP/REQ/TLS ] 2022-07-21T23:37:23 Informational charon 14[TLS] <con9|38> sending fatal TLS alert 'certificate unknown' 2022-07-21T23:37:23 Informational charon 14[TLS] <con9|38> no trusted certificate found for 'GregsiPhone.domain.local' to verify TLS peer 2022-07-21T23:37:23 Informational charon 14[TLS] <con9|38> received TLS intermediate certificate 'DC=local, DC=domain, CN=domain-domainECA-CA' 2022-07-21T23:37:23 Informational charon 14[TLS] <con9|38> received TLS peer certificate 'serialNumber=8714.21901, DC=local, DC=domain, CN=GregsiPhone' 2022-07-21T23:37:23 Informational charon 14[ENC] <con9|38> parsed IKE_AUTH request 8 [ EAP/RES/TLS ] 2022-07-21T23:37:23 Informational charon 14[ENC] <con9|38> received fragment #3 of 3, reassembled fragmented IKE message (1056 bytes) 2022-07-21T23:37:23 Informational charon 14[ENC] <con9|38> parsed IKE_AUTH request 8 [ EF(3/3) ] 2022-07-21T23:37:23 Informational charon 14[NET] <con9|38> received packet: from 101.101.101.101[10673] to 202.202.202.202[4500] (132 bytes)
It appears that OPNsense incorrectly requires the client certificate to be installed inside OPNsense. This should NOT be required. If OPNsense has a server certificate issued from an external CA, and, a copy installed of that external CA (just the public cert, no private key), then OPNsense should be able to correctly verify the authenticity of the remote Mobile IPsec client presented client certificate.Instead, Mobile IPsec fails:[...]
So this means you successfully verified that when the certificate is installed, its working and after deleting it, it doesnt?
Quote from: mimugmail on July 25, 2022, 06:36:51 amSo this means you successfully verified that when the certificate is installed, its working and after deleting it, it doesnt?You just don't / shouldn't ever need to have the client certificate installed!! Full stop.The presence of the CA cert should be enough to verify the client cert.To actually answer your question, no, I haven't tried to extract the client certificate (which would be a mission) and then load that in OPNsense.
cacerts = /var/etc/ipsec/x509ca/0f50f169.0
# This file is automatically generated. Do not editconnections { bypass { remote_addrs = 127.0.0.1 children { bypasslan { local_ts = 10.1.1.0/24 remote_ts = 10.1.1.0/24 mode = pass start_action = trap } } } con-mobile : con-mobile-defaults { # Stub to load con-mobile-defaults }}con-mobile-defaults { fragmentation = yes unique = replace version = 2 proposals = aes128-sha256-modp2048,aes128gcm128-sha256-modp2048 dpd_delay = 10s rekey_time = 12960s reauth_time = 0s over_time = 1440s rand_time = 1440s encap = no mobike = yes local_addrs = 202.202.202.202 remote_addrs = 0.0.0.0/0,::/0 pools = mobile-pool-v4 send_cert = always local { id = fqdn:pfsenseONA.domain.local auth = pubkey cert { file = /var/etc/ipsec/x509/cert-1.crt } } remote { eap_id = %any auth = eap-tls cacerts = /var/etc/ipsec/x509ca/0f50f169.0 } children { con-mobile { # P2 (reqid 1) mode = tunnel policies = yes life_time = 3600s rekey_time = 3240s rand_time = 360s start_action = none local_ts = 0.0.0.0/0 esp_proposals = aes128gcm128-modp2048,aes128-sha256-modp2048 dpd_action = clear } }}pools { mobile-pool-v4 : mobile-pool { addrs = 10.1.10.0/24 }}mobile-pool { # Mobile pool settings template}secrets { private-0 { file = /var/etc/ipsec/private/cert-1.key }}
2022-07-29T20:04:50 Informational charon 07[IKE] <32> sending cert request for "DC=local, DC=Domain, CN=Domain-DomainECA-CA" 2022-07-29T20:04:50 Informational charon 07[IKE] <32> sending cert request for "C=NZ, ST=City, L=Auckland, O=Domain Company Ltd, E=admin@domain.co.nz, CN=DomainOvpnCA"
2022-07-29T20:04:51 Informational charon 07[NET] <con10|33> sending packet: from 202.202.202.202[4500] to 122.122.122.122[23964] (80 bytes) 2022-07-29T20:04:51 Informational charon 07[ENC] <con10|33> generating IKE_AUTH response 1 [ N(AUTH_FAILED) ] 2022-07-29T20:04:51 Informational charon 07[IKE] <con10|33> configured EAP-only authentication, but peer does not support it 2022-07-29T20:04:51 Informational charon 07[IKE] <con10|33> peer supports MOBIKE 2022-07-29T20:04:51 Informational charon 07[IKE] <con10|33> received ESP_TFC_PADDING_NOT_SUPPORTED, not using ESPv3 TFC padding 2022-07-29T20:04:51 Informational charon 07[IKE] <con10|33> initiating EAP_TLS method (id 0x2B) 2022-07-29T20:04:51 Informational charon 07[CFG] <con10|33> selected peer config 'con10' 2022-07-29T20:04:51 Informational charon 07[CFG] <33> looking for peer configs matching 202.202.202.202[pfsenseONA.domain.local]...122.122.122.122[GregsiPhone.domain.local] 2022-07-29T20:04:51 Informational charon 07[ENC] <33> parsed IKE_AUTH request 1 [ IDi N(INIT_CONTACT) IDr CPRQ(ADDR MASK DHCP DNS ADDR6 DHCP6 DNS6 DOMAIN) N(ESP_TFC_PAD_N) N(NON_FIRST_FRAG) SA TSi TSr N(MOBIKE_SUP) ] 2022-07-29T20:04:51 Informational charon 07[ENC] <33> unknown attribute type INTERNAL_DNS_DOMAIN 2022-07-29T20:04:51 Informational charon 07[NET] <33> received packet: from 122.122.122.122[23964] to 202.202.202.202[4500] (384 bytes) 2022-07-29T20:04:51 Informational charon 07[NET] <33> sending packet: from 202.202.202.202[500] to 122.122.122.122[23955] (501 bytes) 2022-07-29T20:04:51 Informational charon 07[ENC] <33> generating IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) CERTREQ N(FRAG_SUP) N(CHDLESS_SUP) N(MULT_AUTH) ] 2022-07-29T20:04:51 Informational charon 07[IKE] <33> sending cert request for "DC=local, DC=Domain, CN=Domain-DomainECA-CA" 2022-07-29T20:04:51 Informational charon 07[IKE] <33> sending cert request for "C=NZ, ST=City, L=Auckland, O=Domain Company Ltd, E=admin@domain.co.nz, CN=DomainOvpnCA" 2022-07-29T20:04:51 Informational charon 07[IKE] <33> remote host is behind NAT 2022-07-29T20:04:51 Informational charon 07[CFG] <33> selected proposal: IKE:AES_CBC_128/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_2048 2022-07-29T20:04:51 Informational charon 07[IKE] <33> 122.122.122.122 is initiating an IKE_SA 2022-07-29T20:04:51 Informational charon 07[ENC] <33> parsed IKE_SA_INIT request 0 [ SA KE No N(REDIR_SUP) N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) ] 2022-07-29T20:04:51 Informational charon 07[NET] <33> received packet: from 122.122.122.122[23955] to 202.202.202.202[500] (432 bytes) 2022-07-29T20:04:51 Informational charon 07[NET] <con10|32> sending packet: from 202.202.202.202[4500] to 122.122.122.122[23964] (80 bytes) 2022-07-29T20:04:51 Informational charon 07[ENC] <con10|32> generating IKE_AUTH response 1 [ N(AUTH_FAILED) ] 2022-07-29T20:04:51 Informational charon 07[IKE] <con10|32> configured EAP-only authentication, but peer does not support it 2022-07-29T20:04:51 Informational charon 07[IKE] <con10|32> peer supports MOBIKE 2022-07-29T20:04:51 Informational charon 07[IKE] <con10|32> received ESP_TFC_PADDING_NOT_SUPPORTED, not using ESPv3 TFC padding 2022-07-29T20:04:51 Informational charon 07[IKE] <con10|32> initiating EAP_TLS method (id 0x22) 2022-07-29T20:04:51 Informational charon 07[CFG] <con10|32> selected peer config 'con10' 2022-07-29T20:04:51 Informational charon 07[CFG] <32> looking for peer configs matching 202.202.202.202[pfsenseONA.domain.local]...122.122.122.122[GregsiPhone.domain.local] 2022-07-29T20:04:51 Informational charon 07[ENC] <32> parsed IKE_AUTH request 1 [ IDi N(INIT_CONTACT) IDr CPRQ(ADDR MASK DHCP DNS ADDR6 DHCP6 DNS6 DOMAIN) N(ESP_TFC_PAD_N) N(NON_FIRST_FRAG) SA TSi TSr N(MOBIKE_SUP) ] 2022-07-29T20:04:51 Informational charon 07[ENC] <32> unknown attribute type INTERNAL_DNS_DOMAIN 2022-07-29T20:04:51 Informational charon 07[NET] <32> received packet: from 122.122.122.122[23964] to 202.202.202.202[4500] (384 bytes) 2022-07-29T20:04:50 Informational charon 07[NET] <32> sending packet: from 202.202.202.202[500] to 122.122.122.122[23955] (501 bytes) 2022-07-29T20:04:50 Informational charon 07[ENC] <32> generating IKE_SA_INIT response 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) CERTREQ N(FRAG_SUP) N(CHDLESS_SUP) N(MULT_AUTH) ] 2022-07-29T20:04:50 Informational charon 07[IKE] <32> sending cert request for "DC=local, DC=Domain, CN=Domain-DomainECA-CA" 2022-07-29T20:04:50 Informational charon 07[IKE] <32> sending cert request for "C=NZ, ST=City, L=Auckland, O=Domain Company Ltd, E=admin@domain.co.nz, CN=DomainOvpnCA" 2022-07-29T20:04:50 Informational charon 07[IKE] <32> remote host is behind NAT 2022-07-29T20:04:50 Informational charon 07[CFG] <32> selected proposal: IKE:AES_CBC_128/HMAC_SHA2_256_128/PRF_HMAC_SHA2_256/MODP_2048 2022-07-29T20:04:50 Informational charon 07[IKE] <32> 122.122.122.122 is initiating an IKE_SA 2022-07-29T20:04:50 Informational charon 07[ENC] <32> parsed IKE_SA_INIT request 0 [ SA KE No N(REDIR_SUP) N(NATD_S_IP) N(NATD_D_IP) N(FRAG_SUP) ] 2022-07-29T20:04:50 Informational charon 07[NET] <32> received packet: from 122.122.122.122[23955] to 202.202.202.202[500] (432 bytes) 2022-07-29T20:04:50 Informational charon 07[KNL] <con1|1> querying policy 0.0.0.0/0 === 0.0.0.0/0 in failed, not found