<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">You need “ipsec secrets” to reread the secrets if you add / remove them.<br><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On Aug 4, 2020, at 11:39, Štěpán Brož <stepan@izitra.cz> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div>Hello Balaji,<br></div><div><br></div><div>There is a command for re-reading secrets: # ipsec whack --rereadsecrets</div><div><br></div><div>Does that work for you?</div><div><br></div><div>Regards,<br></div><div>Stepan<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">út 4. 8. 2020 v 17:22 odesílatel Balaji Thoguluva <<a href="mailto:tbbalaji@gmail.com">tbbalaji@gmail.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi Developers,</div><div><br></div><div>I have a connection with authby=rsasig and all the rest of the parameters set correctly. I am able to establish a connection successfully with X.509 certificate-based authentication. Now when the tunnel is up, I change the authentication from rsasig to PSK by setting authby=secret (also created a <conn-name>.secrets file for storing the PSK password) and all the parameters related to certificate removed from the connection. Without invoking "ipsec restart" command, I do a "/usr/local/sbin/ipsec auto --ondemand taccert" to load the PSK configuration automatically. The tunnel gets torn down. Now when the data packet triggers the tunnel, Libreswan is able to sends an IKE_SA_INIT request and gets back the IKE_SA_INIT response. However it stops processing there because it cannot find the PSK.</div><div><br></div><div>Aug  4 14:23:05 [localhost] pluto[4324]: initiate on demand from <a href="http://10.196.172.139:0" target="_blank">10.196.172.139:0</a> to <a href="http://10.196.175.174:49" target="_blank">10.196.175.174:49</a> proto=6 because: acquire       <br>Aug  4 14:23:05 [localhost] pluto[4324]: "taccert" #3: initiating v2 parent SA                                                        <br>Aug  4 14:23:05 [localhost] pluto[4324]: "taccert" #3: local IKE proposals for taccert (IKE SA initiator selecting KE): 1:IKE:ENCR=AES_CBC_256;PRF=HMAC_SHA2_256;INTEG=HMAC_SHA2_256_128;DH=MODP2048<br>Aug  4 14:23:05 [localhost] pluto[4324]: "taccert" #3: STATE_PARENT_I1: sent v2I1, expected v2R1                                <br>Aug  4 14:23:05 [localhost] pluto[4324]: "taccert" #3: No matching PSK found for connection:taccert                                                                                                   <br>Aug  4 14:23:05 [localhost] pluto[4324]: "taccert" #3: Failed to find our PreShared Key                                                                                  <br>Aug  4 14:23:05 [localhost] pluto[4324]: "taccert" #4: deleting state (STATE_UNDEFINED) and NOT sending notification                        <br>Aug  4 14:23:08 [localhost] sshd[4782]: pam_authp(sshd:auth): pam_sm_authenticate: Timeout waiting for authProxy         <br><br></div><div>A couple of questions.</div><div><br></div><div>1. Can we get the PSK tunnel establishment working without restarting IPsec? It looks to me that the secret file is not loaded by the libreswan. Is there any way to load the secret file by any utility command on the fly?</div><div><br></div><div>Any help is appreciated.</div><div><br></div><div>Thanks,</div><div>Balaji<br></div></div></div></div></div></div>
_______________________________________________<br>
Swan-dev mailing list<br>
<a href="mailto:Swan-dev@lists.libreswan.org" target="_blank">Swan-dev@lists.libreswan.org</a><br>
<a href="https://lists.libreswan.org/mailman/listinfo/swan-dev" rel="noreferrer" target="_blank">https://lists.libreswan.org/mailman/listinfo/swan-dev</a><br>
</blockquote></div>
<span>_______________________________________________</span><br><span>Swan-dev mailing list</span><br><span>Swan-dev@lists.libreswan.org</span><br><span>https://lists.libreswan.org/mailman/listinfo/swan-dev</span><br></div></blockquote></body></html>