OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: DavidRa on December 29, 2022, 02:35:42 PM

Title: Auth Failures - IPSec IKEv2 + Win11 EAP-MSCHAPv2
Post by: DavidRa on December 29, 2022, 02:35:42 PM
I've fallen at the final hurdle configuring my OPNsense to accept incoming IPSec "road warrior" Mobile Client connections. The intent is to use AD + TOTP - and under System > Access > Tester, I can successfully authenticate using username and passwordTOTP (I have it configured in "reverse" mode).

Reference versions:

I've been following the combination of https://docs.opnsense.org/manual/how-tos/ipsec-rw.html for the OPNsense side and https://docs.opnsense.org/manual/how-tos/ipsec-rw-w7.html#ikev2-eap-mschapv2-or-eap-radius for the client.

Current Config - OPNsense (VPN > IPSec > Mobile Clients)

Current Config - OPNsense - Phase 1 Selector

Current Config - OPNsense - Phase 2 Selector

On the client side, I've created a new IKEv2 connection following along the document above. However, Windows doesn't choose very secure Phase 1 and Phase 2 configurations, so I've forced the appropriate encryption and hashes:

Set-VpnConnectionIpsecConfiguration -ConnectionName VPN -AuthenticationTransformConstants SHA256 -CipherTransformConstants AES256 -DHgroup Group14 -EncryptionMethod AES256 -IntegrityCheckMethod SHA256 -PfsGroup None

Prior to running that command, I was getting policy match errors which are now resolved. On the client, I get "username or password incorrect" and Event Viewer claims error -2143157998 which I think translates to 0x80420112? Doesn't seem to match error codes I recognise (often starting with 0x8007...). Edit: Authentication failed. Thanks Windows, much useful. Very help.

Strongswan on the 'droid fares about the same, though obviously there's a more helpful log that tells me authentication failed.

I don't get any errors in the OPNsense ipsec log other than Auth Failed, which I would have expected - are there other logs I can look at here? Other suggestions for logs / log levels are appreciated.