Strongswan IKEv2 vpn on Windows 10 client "policy match error"
The problem is most likely that the Windows client proposes a weak Diffie-Hellman (DH) group (1024-bit MODP). That group is not used anymore by strongSwan unless the user configures it explicitly.
You have two options:
- Configure Windows to use a stronger DH group. This can be done either
- via Set-VpnConnectionIPsecConfiguration PowerShell cmdlet, which allows enabling stronger DH groups (e.g. group 14/2048-bit MODP or 384-bit ECP) and even other algorithms (e.g. AES-GCM combined-mode encryption/integrity, which is more efficient, but needs to be enabled explicitly on the server too)
- or via registry by adding the DWORD key
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Rasman\Parameters\NegotiateDH2048_AES256
. Set it to1
to enable (the other algorithms are still proposed), or2
to enforce the use of 256-bit AES-CBC and 2048-bit MODP DH (only these will be proposed).
- Add the proposed, weak DH group (1024-bit MODP) to the IKE proposal on the server (e.g. configure something like
ike=aes256-aes128-sha256-sha1-modp3072-modp2048-modp1024
, which adds it at the end so other clients may use stronger DH groups).
Option 1 is definitely preferred.