Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run a linux server with ikev2 (by using strongswan ) . It seems the exact problem is about certificate and private key . I've used so many topics about doing it such as this topic when i execute ipsec rereadall this output is showed to me :

root@HAMIDx9:~# ipsec rereadall 002 loading secrets from "/etc/ipsec.secrets" 002 syntax error in private key file 003 "/etc/ipsec.secrets" line 14: Private key file -- could not be loaded 002 loaded ca certificate from '/etc/ipsec.d/cacerts/strongswanCert.pem' 002 Changing to directory '/etc/ipsec.d/crls' root@HAMIDx9:~#

first i used a encrypted private key and then i understood strongswan couldn't use it so converted the key to a RSA plain text ( so used without passphrase ) but still this error was apeared . Log from daemon.log :

Aug 3 02:48:42 HAMIDx9 charon: 04[LIB] building CRED_PRIVATE_KEY - RSA failed, tried 11 builders Aug 3 02:48:42 HAMIDx9 charon: 04[CFG] loading private key from '/etc/ipsec.d/private/strongswanKey1.pem' failed

if it is needed i can write the configurations . of course when i try ipsec restart after that i can connect to the serve from Win7 but for 2 times after that no private key is seen on daemon.log and i can't connect to it ( after connecting just one work 'ping , loading a page' is possible and then no internet access )

Aug 3 02:56:51 HAMIDx9 charon: 02[IKE] peer supports MOBIKE Aug 3 02:56:51 HAMIDx9 charon: 02[IKE] no private key found for 'blah blah'

Thank you for your helps .

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.