<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"HP Simplified";
        panose-1:2 11 6 4 2 2 4 2 2 4;}
@font-face
        {font-family:"Trebuchet MS";
        panose-1:2 11 6 3 2 2 2 2 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
h2
        {mso-style-priority:9;
        mso-style-link:"Heading 2 Char";
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:18.0pt;
        font-family:"Times New Roman","serif";
        font-weight:bold;}
h3
        {mso-style-priority:9;
        mso-style-link:"Heading 3 Char";
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:13.5pt;
        font-family:"Times New Roman","serif";
        font-weight:bold;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.Heading2Char
        {mso-style-name:"Heading 2 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 2";
        font-weight:bold;}
span.Heading3Char
        {mso-style-name:"Heading 3 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 3";
        font-weight:bold;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Some useful info from the
<a href="http://wiki.strongswan.org/projects/strongswan/wiki/Windows7">Wiki</a> which may help you on this one:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:12.15pt;background:white">
<b><span style="font-family:"Trebuchet MS","sans-serif";color:#555555">Rekeying behavior<o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:12.15pt;background:white">
<a name="IKE_SA-rekeying"></a><b><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#555555">IKE_SA rekeying<o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:12.15pt;background:white">
<span style="font-size:8.5pt;font-family:"Verdana","sans-serif";color:#36000C">The Windows 7 client supports IKE_SA rekeying, but can't handle unsupported Diffie Hellman groups. If a strongSwan gateway initiates IKE_SA rekeying, it must use <i>modp1024</i> as
 the DH group in the first attempt, otherwise rekeying fails. You can achieve this by setting <i>modp1024</i> as the first (or only) DH group in the gateways <i>ike</i> proposal.<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:7.5pt;line-height:12.15pt;background:white">
<a name="CHILD_SA-rekeying"></a><b><span style="font-size:10.0pt;font-family:"Trebuchet MS","sans-serif";color:#555555">CHILD_SA rekeying<o:p></o:p></span></b></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:12.15pt;background:white">
<span style="font-size:8.5pt;font-family:"Verdana","sans-serif";color:#36000C">Rekeying CHILD_SAs is also supported by the Windows 7 client. For some reason, a client behind NAT does not accept a rekeying attempt and rejects it with a Microsoft specific notify
 12345, containing an error code <i>ERROR_IPSEC_IKE_INVALID_SITUATION</i>.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:12.15pt;background:white">
<span style="font-size:8.5pt;font-family:"Verdana","sans-serif";color:#36000C">To work around the issue, let the client initiate the rekeying. It will do so about every 58 minutes and 46 seconds, so set the gateway rekey time a little higher. There is no way
 known to change the rekey time (the <i>netsh.ras.ikev2saexpiry</i> options affect the Windows Server implementation only).<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;line-height:12.15pt;background:white">
<span style="font-size:8.5pt;font-family:"Verdana","sans-serif";color:#36000C">Another option is to set no rekey time, but only a hard lifetime to delete the CHILD_SA. The client will renegotiate the SA when required.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"HP Simplified","sans-serif";color:black">Andy Paton -
</span></b><span style="font-size:9.0pt;font-family:"HP Simplified","sans-serif";color:#262626">Bsc. (Hons), MBCS</span><b><span style="font-size:9.0pt;font-family:"HP Simplified","sans-serif";color:black"><br>
</span></b><span style="font-size:9.0pt;font-family:"HP Simplified","sans-serif";color:#717172">Innovation Engineer<br>
<br>
<a href="mailto:andy.paton@hp.com"><span style="color:#717172">andy.paton@hp.com</span></a><br>
M +44 7786 748 199<br>
<br>
<br>
</span><a href="http://www.hp.com/"><span style="font-size:9.0pt;font-family:"HP Simplified","sans-serif";color:#717172;text-decoration:none"><img border="0" width="30" height="30" id="Picture_x0020_2" src="cid:image001.png@01CE86F2.376470A0" alt="HP"></span></a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> users-bounces+andy.paton=hp.com@lists.strongswan.org [mailto:users-bounces+andy.paton=hp.com@lists.strongswan.org]
<b>On Behalf Of </b>Michael Ulitskiy<br>
<b>Sent:</b> 22 July 2013 15:40<br>
<b>To:</b> users@lists.strongswan.org<br>
<b>Subject:</b> [strongSwan] Win7 L2TP/IPSEC clients disconnect every 8 hours<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">Hello,</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B"> </span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">I've setup strongswan/openl2tp pair as l2tp/ipsec server for win7 clients.</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">IPSEC part is using PSK authentication.</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">Everything works fine except one problem. Win7 clients disconnect exactly every 8 hours.</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">It seems it fails to rekey IKE SA. The config is pretty standard:</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-family:"Courier New""> <o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">ipsec.conf:</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">conn l2tp</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">rekey = no</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">type=transport
</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">leftauth=psk</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">rightauth=psk</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">leftprotoport=17/1701</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">right=%any</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">rightprotoport=17/%any</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">auto=add</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-family:"Courier New""> <o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">I wonder if it's a known problem and if there's any fix for it. I did some googling, but didn't find any definitive
 answers.</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">Please help,</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">Thanks,</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B"> </span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-block-indent:0;-qt-user-state:0"><span style="font-size:11.5pt;font-family:"Courier New";color:#1F1C1B">Michael</span><span style="font-family:"Courier New""><o:p></o:p></span></p>
<p style="margin:0cm;margin-bottom:.0001pt;-qt-paragraph-type:empty;-qt-block-indent:0">
<span style="font-family:"Courier New""> <o:p></o:p></span></p>
</div>
</body>
</html>