hwdsl2 / setup-ipsec-vpn

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
Other
25.25k stars 6.32k forks source link

ikev2.sh could not find certificate named "IKEv2 VPN CA" #1513

Closed ptorrent closed 10 months ago

ptorrent commented 10 months ago

Hello there !

I'm usine ikev2 script for creating certificates for clients. It was working fine, but since 2 days I got this error without any reason :

Use one word only, no special characters except '-' and '_'.
Client name: test

Specify the validity period (in months) for this client certificate.
Enter an integer between 1 and 120: [120] 120

## Generating client certificates...

Generating key.  This may take a few moments...

certutil: could not find certificate named "IKEv2 VPN CA": error 0: Success
certutil: unable to create cert (Success)
## Creating client configuration...pk12util: find user certs from nickname failed: SEC_ERROR_UNKNOWN_CERT: The requested certificate could not be found

Am I doing something wrong ?

ptorrent commented 10 months ago

PS: I already tried to execute vpn.sh at last version. Still same issue

hwdsl2 commented 10 months ago

@ptorrent Hello! The "IKEv2 VPN CA" certificate may be broken or missing on your VPN server, which triggers this issue. I am not sure about the exact reason this happened. Recent tests have passed so it may be an issue specific to your server.

To check the "IKEv2 VPN CA" certificate, run:

sudo certutil -L -d sql:/etc/ipsec.d -n "IKEv2 VPN CA"

To fix this issue, you may need to uninstall the VPN (which permanently deletes all VPN configuration), then install it again.

ptorrent commented 10 months ago

Hello, thanks for your support. It's working after ikev reinstallation.

What I've to backup for prevent this behavior ?

hwdsl2 commented 10 months ago

@ptorrent Please refer to #1462.