Duplicate of this thread in the strongswan-community forum on github:
https://github.com/strongswan/strongswa ... sions/2093
I am struggling with a to me absurd problem with strongswan on one of our RockyLinux Laptops. We have a working setup with a Mikrotik VPN gateway, wit LetsEncrypt-ceriticates, and EAP authentication. All clients windows, mac, ios, android and Linux (Debian and Fedora), are able to connect to the VPN gateway. And the RockyLinux laptop in question are able to connect to a similar Gateway running pfsense also with letsencrypt certificates.
I have tried the prebuilt package from EPEL-repository (5.9.10-1.el9), and I have tried to recompile the latest version from source (Linux strongSwan U5.9.13/K5.14.0-362.13.1.el9_3.x86_64), and both gives me the same error.
This is the output from a working client connecting from a Ferdora-laptop with strongswan (5.9.11), this is running via NetworkManager and charon-nm, but we get the same result using ipsec.conf / ipsec.secrets via the CLI:
Code: Select all
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] checking certificate status of "[CN=CERTIFICATE COMMON NAME]"
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] requesting ocsp status from 'http://r3.o.lencr.org' ...
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] ocsp response correctly signed by "C=US, O=Let's Encrypt, CN=R3"
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] ocsp response is valid: until Feb 16 00:03:58 2024
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] certificate status is good
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] checking certificate status of "C=US, O=Let's Encrypt, CN=R3"
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] fetching crl from 'http://x1.c.lencr.org/' ...
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] using trusted certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] crl correctly signed by "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] crl is valid: until Mar 12 00:59:59 2024
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[CFG] certificate status is good
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[IKE] authentication of '[CN=CERTIFICATE COMMON NAME]' with RSA signature successful
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[IKE] server requested EAP_IDENTITY (id 0x00), sending 'EAP-USER@DOMAIN'
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[ENC] generating IKE_AUTH request 2 [ EAP/RES/ID ]
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 11[NET] sending packet: from XXX.XXX.XXX.XXX[57179] to XXX.XXX.XXX.XXX[4500] (112 bytes)
feb. 09 12:57:08 [FEDORA-LAPTOP] charon-nm[361273]: 12[NET] received packet: from YYY.YYY.YYY.YYY[4500] to YYY.YYY.YYY.YYY[57179] (144 bytes)
Code: Select all
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[IKE] received end entity cert "[CN=CERTIFICATE COMMON NAME]""
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] using certificate "[CN=CERTIFICATE COMMON NAME]"
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] using untrusted intermediate certificate "C=US, O=Let's Encrypt, CN=R3"
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] using trusted ca certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] certificate policy 2.23.140.1.2.1 for '[CN=CERTIFICATE COMMON NAME]' not allowed by trustchain, ignored
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] reached self-signed root ca with a path length of 1
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] checking certificate status of "[CN=CERTIFICATE COMMON NAME]"
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] ocsp response is valid: until Feb 15 00:58:58 2024
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] using cached ocsp response
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] certificate status is good
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] checking certificate status of "C=US, O=Let's Encrypt, CN=R3"
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] using trusted certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] crl correctly signed by "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] crl is valid: until Mar 12 00:59:59 2024
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] using cached crl
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[CFG] certificate status is good
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[IKE] signature validation failed, looking for another key
Feb 10 09:43:20 [ROCKY-LAPTOP] charon[740492]: 14[ENC] generating INFORMATIONAL request 2 [ N(AUTH_FAILED) ]
Code: Select all
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[IKE] received end entity cert "[CN=CERTIFICATE COMMON NAME]"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[IKE] received issuer cert "C=US, O=Let's Encrypt, CN=R3"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] using certificate "[CN=CERTIFICATE COMMON NAME]"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] using untrusted intermediate certificate "C=US, O=Let's Encrypt, CN=R3"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] using trusted ca certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] certificate policy 2.23.140.1.2.1 for 'CN=242.62-97-222.bkkb.no' not allowed by trustchain, ignored
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] reached self-signed root ca with a path length of 1
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] checking certificate status of "[CN=CERTIFICATE COMMON NAME]"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] requesting ocsp status from 'http://r3.o.lencr.org' ...
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] ocsp response correctly signed by "C=US, O=Let's Encrypt, CN=R3"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] ocsp response is valid: until Feb 17 09:57:58 2024
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] certificate status is good
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] checking certificate status of "C=US, O=Let's Encrypt, CN=R3"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] fetching crl from 'http://x1.c.lencr.org/' ...
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] using trusted certificate "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] crl correctly signed by "C=US, O=Internet Security Research Group, CN=ISRG Root X1"
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] crl is valid: until Mar 12 00:59:59 2024
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[CFG] certificate status is good
Feb 10 09:58:34 [ROCKY-LAPTOP] charon[787301]: 13[IKE] authentication of '[HOSTNAME (SAN:DNS-name]' with RSA_EMSA_PKCS1_SHA2_384 successful
My gut feeling is that somethings goes wrong with the verification of the certificate. It fails before the EAP-authentication even is tried. But i really cannot understand why it succeeds with the pfsense gateway and not with the mikrotik gateway.
Any tips, or suggestions, to make sense of this?