<div dir="auto">Hello Paul,<div dir="auto"><br></div><div dir="auto">After a few days of running debugs, I finally found the culprit, it was PFS (strangely enough, both sides agreed on each other proposals and brought SAs up, prior to re-negotiations, but that's another issue).</div><div dir="auto"><br></div><div dir="auto">Now, after configuring "pfs=no", the "auto" behaves as expected. With little exception, though - after re-negotiations, VTI never comes up by itself. I work around this issue by adding "vti-shared=yes", and now the whole thing behaves.</div><div dir="auto"><br></div><div dir="auto">As there any debug options, I can use for troubleshoot VTI creation?</div><div dir="auto"><br></div><div dir="auto">As for "whack --listen", in fact the IP settings are configured statically so the IP address never changes, and yet, without "--listen", I do notice Pluto isn't listening (using "netstat -na | grep 500"). Maybe I'm wrong on that, so any suggestions will be welcomed.</div><div dir="auto"><br></div><div dir="auto">Thank you.</div><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">בתאריך 23 בינו' 2018 4:15 AM,‏ "Paul Wouters" <<a href="mailto:paul@nohats.ca" target="_blank">paul@nohats.ca</a>> כתב:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, 19 Jan 2018, Alex K. wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I tried to delete SAs on both sides (till there's no SA shown on my side, using "ip xfrm state"), playing with right/left subnets and then<br>
generating traffic accordingly (now the subnets are <a href="http://0.0.0.0/0" rel="noreferrer" target="_blank">0.0.0.0/0</a>), issuing "ipsec whack --listen", since sometimes I bring the tunnel down by<br>
unplugging the cable and then Pluto does not resume listening automatically. All to no avail, unfortunately. As far as I remember, debugs<br>
on Cisco side does not indicate incoming re-establishment tries. At least, not full IKE negotiations (maybe there's something, but very<br>
limited at most). What I discovered, is that re-adding the connection and then using "--up" will bring it up, restarting the IPSEC service<br>
will also bring it up automatically and (surprisingly, to some extent) shutting Pluto down ("ipsec whack --shutdown").<br>
<br>
Maybe I'm doing something wrong, that's why I'm seeking help here. Thank you.<br>
</blockquote>
<br>
auto=start should work. If you lose and gain the same IP, you should not<br>
need whack --listen. If an IP changes, you will need whack --listen to<br>
start using the new IP. Then you should also have left=%defaultroute so<br>
that pluto knows it needs to re-orient this connection.<br>
<br>
I recommend you test with 3.23rc4 (from <a href="http://download.libreswan.org/development/" rel="noreferrer" target="_blank">download.libreswan.org/develop<wbr>ment/</a>) as we<br>
did make some changes to the auto= behaviour.<br>
<br>
Paul<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
בתאריך 19 בינו' 2018 4:11 AM, "Paul Wouters" <<a href="mailto:paul@nohats.ca" target="_blank">paul@nohats.ca</a>> כתב:<br>
      On Thu, 18 Jan 2018, Alex K. wrote:<br>
<br>
            What are the possible ways to bring a Libreswan VTI up?<br>
<br>
            Let me elaborate the situation a little bit - I have a Libreswan 3.21 compiled from sources on Debian Stretch as.<br>
            Anyhow, I have a<br>
            basic VTI setup according to the example on Libreswan website.<br>
<br>
<br>
      Using the vti options in the connection is the best way. Then,<br>
      the VTI interfaces are created/deleted when the tunnels go up<br>
      or down. You can do things manually too using the "ip tun"<br>
      command, but I wouldn't recommend it.<br>
<br>
            On system startup, everything works just fine. The question is, how can I bring the tunnel up (after say, a restart<br>
            to the opposite<br>
            end), *without* manual intervention?<br>
<br>
            Sure, I can always get to the box, get the terminal up and run "sudo ipsec auto --add vti1", following "--up". But<br>
            say I'm not on<br>
            site right now or wish to plan for better VPN recovery setup, what are my possibilities? Can some traffic bring the<br>
            VTI up? Is there<br>
            a keep alive/always up setting?<br>
<br>
<br>
      If you have auto=start, whenever the tunnel goes down, it will<br>
      automatically try to restart. Even if the other end send you<br>
      a delete request.<br>
<br>
      When using auto=ondemand, if the tunnel goes down, it will only<br>
      be brought back up when there is traffic to trigger the tunnel.<br>
<br>
      Paul<br>
<br>
<br><br></blockquote>
</blockquote></div></div>
</div>