QuoteIn fact, I think the naming could be improved in some points. The current naming is sometimes confusing.
- Site-to-Site with IKEv2: Authentication based on "Mutual RSA"
- "My Certificate Authority" has a confusing description and maps to "rightca" configuration option. The parameter should be named to "Remote endpoint authentication CA"
QuoteYou're right! I checked my ipsec.conf and neither "rightcert" nor "rightca" are configured. :o
- ...
- Roadwarrior with IKEv2: Authentication based on "Mutual RSA + EAP-MSCHAPv2"
- There is no possibility to configure which remote endpoint certificates are acceptable (neither leaf certificates or certification authorities) and no corresponding "rightcert" or "rightca" configuration options are placed in the ipsec configuration file. I do not know, how this is handled by strongswan. I guess, in this situation all remote endpoint certificates which belongs to any trusted CA are accepted. This could be a big security risk.
According to StrongSwan docs any valid certificate issued by one of the trusted CAs in /etc/ipsec.d/cacerts can be used by the peer if no rightca parameter is present.
Indeed, we shouldn't like that.
QuoteVery good recommendations.
Recommendations:
- Adapt the gui to follow the strongswan configuration file in ways that parameters like "leftauth, rightauth, leftcert, rightcert, rightca" etc. are configurable on a per connection basis
- Separate authentication rounds for IKEv2 (xauth for IKEv1 respectively), e.g. "Auth 1: Mutual RSA" and "Auth 2: EAP-MSCHAPv2" instead of "Auth: Mutual RSA + EAP-MSCHAPv2"
- Allow configuring multiple dedicated roadwarrior connections with their own IP pools
- Move from deprecated "ipsec.conf" to "swanctl" (swanctl.conf and strongswan.conf")
- Make strongswan aware of revoked certificates (can be challenging). For now, users probably feel secure in case they revoke certificates of compromised private keys within the trust center. ???
A revision of the StrongSwan implementation and improvement of the configuration options in OPNsense is definitely required. On this occasion we should switch from deprecated ipsec.conf to swanctl.conf.
"