I’ve managed to configure MikroTik (v6.44.3) as IKEv2 server with authentication users via eap-radius and it is working on MacOS, Windows 7/10, Linux (StrongSwan) as clients, but I can’t get it work on Android using Strongswan application. Server has certificates generated from Let’s Encrypt and it is set in peer identity to send both server cert and LE chain.
When I set My ID Type as fqdn in peer identity and my ID as CN or SAN matching server certificate, I always got error message “identity not found for peer: RFC822: my username” and Android client show just “AUTHENTICATION_FAILED notify error” in logs…
If I set My ID to “auto”, there is “got critical error: AUTHENTICATION_FAILED” in mikrotiks log and Android Strongswan client shows:
13[ENC] parsed IKE_AUTH response 1 [ IDr CERT CERT AUTH EAP/REQ/ID ]
13[IKE] received end entity cert “CN=mydomain.com”
13[IKE] received issuer cert “C=US, O=Let’s Encrypt, CN=Let’s Encrypt Authority X3”
13[IKE] no trusted RSA public key found for ‘server public IP’
13[ENC] generating INFORMATIONAL request 2 [ N(AUTH_FAILED) ]
It seems like mikrotik returns IP as My ID (but documentation says that it shouldn’t for certificate base connection). All other systems are connecting just fine. What am I missing?
Can you share the config of your Mikrotik server here? I have done tests with IKEv2 using RSA certificates and made it work in Windows, MacOS, iOS and Android (StrongSwan). I like to try your configuration to see how differs from mine and try to replicate your authentication using Strongswan on Android.
Multiple peers are each for different OS (e.g. Windows don’t accept any fqdn and works only with type=auto, macos is kind of benevolent - works with any fqdn (remoteID and CN/SAN must match))
IPSec service is also checked in Radius settings.
Here is strongswan config which works on linux but not on android strongswan client
Try the latest beta version, it has a fix for EAP to prefer SAN for identity checking. If that does not work either, post your ‘/certificate print’ output .
thank you, I can confirm, that with latest beta (6.45beta54) it works also on Android Strongswan client. However upgrading to this beta version brakes logging to server via API (using username and password) which works on other mikrotiks (v6.44.3) and I didn’t find anything in changelogs regarding changes in API login.
There is only “login failure for user … via api” in logs. I’ve tried to change user password in Mikrotik and edit script with new password with no luck (using Python3). Then I’ve tried to login without any password and it worked !! Now I can log as any user stored in system via api with no password ! Using any password (correct and incorrect) doesn’t work for api login