At build-time, strongswan isn't compiled with --with-nm-ca-dir set to the system-wide PKI store, which causes problems when configured via NetworkManager without a certificate specified. Taking a peek at Debian, it looks like they ran into the same issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835095 This can be tweaked without rebuilding by end-users by creating /etc/strongswan/strongswan.d/charon-nm.conf: charon-nm { ca_dir = /etc/pki/tls/certs } Note that once you make this change, you run into selinux policy issues; charon-nm isn't allowed to access those files: AVC avc: denied { map } for pid=31942 comm="charon-nm" path="/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" dev="dm-1" ino=394791 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=0 AVC avc: denied { map } for pid=31942 comm="charon-nm" path="/etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt" dev="dm-1" ino=394787 scontext=system_u:system_r:ipsec_t:s0 tcontext=system_u:object_r:cert_t:s0 tclass=file permissive=0
Access to the certificates worked for me in Fedora 28. The package fix to use --with-nm-ca-dir configure option would be a better solution. I have tested it locally and will send a PR soon.
Proposed fix: https://src.fedoraproject.org/rpms/strongswan/pull-request/6
Why would you want the system CA store that relates to public CA's for TLS to apply to your VPN CA's ? almost always, VPN CA's are private CA's. I wouldn't want to add 500+ CA's to my VPN server setup.
(In reply to Paul Wouters from comment #3) > Why would you want the system CA store that relates to public CA's for TLS > to apply to your VPN CA's ? almost always, VPN CA's are private CA's. I > wouldn't want to add 500+ CA's to my VPN server setup. The configure flag only applies to charon-nm; the CAs are used to authenticate the server on the initiator side. As mentioned in comment #0, this is easily overridable in charon-nm settings. Apparently, strongSwan developers think nothing bad of using /usr/share/ca-certificates (Debian's trusted vendor CA directory?) as the default. It should work out of the box when the VPN server does use a certificate issued by a private CA, which many do (it does not have to be the same CA that is used for client auth PKI, which indeed is often private to the server operator). Adding a self-signed CA to /etc/pki/ca-trusted anchors is also very easy; conversely, supplying a custom certificate in the UI does not currently work (https://wiki.strongswan.org/issues/2671). If there is a concern with the trust anchors in /etc/pki/ca-trusted, it should equally apply to any applications using the system-wide certificate store, not just VPN.
(In reply to Mikhail Zabaluev from comment #4) > It should work out of the box when the VPN server does use a > certificate issued by a private CA, which many do That should have been "public CA", sorry.
I don't agree with this assessment. Anyone can get a server cert signed by a random CA. So if someone spoofs DNS of your corporate VPN server, you don't want it to get validated when someone redirects you to their bogus VPN server that you validate with a random public CA. Obviously, they would just accept your client AUTH regardless and now you think you are connected to your VPN while you are connected to some rogue server. A VPN connection is quite different from a HTTPS connection. You have no reason to trust any HTTPS server. You have a trust relationship with your VPN service and allow them to do things, possibly even reconfigure your local network. But even just connected to them, might open up all yours ports via the VPN to the rogue server
(In reply to Paul Wouters from comment #6) I see your point. But the current default still makes no sense: /usr/share/ca-certificates does not exist in a typical Fedora installation and may be immutable in ostree-based setups. Maybe point it to something like /etc/pki/vpn by default, and maybe later someone finds a clever managed way to populate it?
New proposed fix: https://src.fedoraproject.org/rpms/strongswan/pull-request/7
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.