<div dir="ltr">Unfortunately the reason for moving to libreswan was it's availability in stock AWS Linux2, currently version 3.25. Best I can find in a Centos Repo is 3.29 - looks like even if I get this working it'll be unsupported for a long time, so not really an option for a business usage.<div><br></div><div>The site2sites (ie PSK) are static and their IP is added to the conf section (AWS %localhost and rightip=1.2.3.4), but the remote ends are turnkey devices so I cannot make them add an IDr payload. The roadwarriors are Mac native VPN clients so even less opportunity to do anything else.</div><div><br></div><div>Any clever trick that might work in the 3.25 server version? I tried setting PSK to IKEv1 and certs to ikev2 which surprisingly worked for concurrent connections for about 5 minutes before crashing and burning and needing the AWS server to be soft rebooted so who knows what happened there....</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 9, 2020 at 11:01 AM Paul Wouters <<a href="mailto:paul@nohats.ca">paul@nohats.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 5 Mar 2020, Rian Aldridge wrote:<br>
<br>
> I'm recently coming to libreswan with configs from strongswan, and whilst I have almost everything working, I'm running into an<br>
> issue where I have two conn sections for inbound connections, but with different authby= mechanisms.<br>
> I cannot find an example on the web of any config files that do this in libreswan, so please let me know if it's just not<br>
> possible!<br>
> <br>
> The connection from the PSK host will attempt ike2 with the first connection only (certhosts), fails on the phase1 negotiation<br>
> and returns NO_PROPOSAL_CHOSEN rather than trying 'pskhost'. If I add the ike ciphers to it, then phase1 completes but it insists<br>
> on a cert authby and returns AUTHENTICATION_FAILED rather than trying the next conn. In strongswan this config would<br>
> automatically select whichever conn it needed to to make the link come up. Turning off certhosts (auto=ignore) has pskhost pass<br>
> phase1 and 2 with PSK, as does changing the order of the conns in the file.<br>
<br>
Code for this has recently improved so please do retry with 3.31.<br>
<br>
If possible, the remote endpoints should send the IDr payload, and then<br>
we can switch to the right connection, provided you have different IDs<br>
for the conns as your connections below suggest you do.<br>
<br>
> I need both because I have site2sites on PSK, and roadwarriors on certificates. Neither remote end is libreswan, nor tweakable.<br>
> Any suggestions?<br>
<br>
If the site2sites are on static IPs, putting in the IPs would help. But<br>
if those are also configured with right=%any, it is a little harder.<br>
<br>
Let me know if 3.31 still has this problem for you?<br>
<br>
Paul<br>
<br>
> The (abbreviated) config is below. Setup for ip ranges etc skipped for brevity<br>
> <br>
> conn common<br>
>   ikev2=insist<br>
>   left=%defaultroute<br>
> <br>
> conn certhosts<br>
>   also=common<br>
>   ike=aes256-sha2;modp2048<br>
>   authby=rsasig<br>
>   leftcert=myX509<br>
>   leftid=@<a href="http://vpn.example.com" rel="noreferrer" target="_blank">vpn.example.com</a><br>
>   right=%any<br>
> <br>
> conn pskhost<br>
>   also=common<br>
>   ike=aes128-sha1;modp2048<br>
>   authby=secret<br>
>   leftid=1.2.3.4<br>
> <br>
><br>
</blockquote></div>