I have two strongswan VPN's (or l2tp/ipsec) with same configuration and I can't connect to second one which uses pre-shared key which contains double quote, ie. "

I can connect to first one without double quote in preshared key. When I change preshared key intentionaly to wrong one, output in syslog describing error is very similar to output of second VPN connect try.

Thus I think I need to escape double quote in preshared key somehow in order to make it work, however these didn't help:

Any idea?

I use Ubuntu 18.04 Bionic Beaver


In the strongswan docs, it says "The sequence cannot contain newline or double-quote characters"

So you'll either have to:

  • convince them that such an unstandard policy is foolish (unlikely)
  • just get another key that has no newlines and double quotes
  • patch it
  • Thanks for reply @Peter, on same page there is also: Alternatively, preshared secrets can be represented as hexadecimal or Base64 encoded binary values. Also kindly see that I already posted link to that page in my question. – Ľubomír Mlích Aug 26 '19 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.