<div>Thank you for answer.</div><div>Hmm strange...  </div><div> </div><div>Anyway I'm find how to achieve that:</div><div> </div><div>Just create separate "conn" section for each certificate common names</div><div>i.e.</div><div> </div><div> </div><div>conn ikev2-1st-client</div><div> ...</div><div><div>  rightid="CN=client1"</div><div>  <span style="background-color:#ffffff;color:#333333;float:none;font-family:'helvetica neue' , 'helvetica' , 'arial' , sans-serif;font-size:14px;font-style:normal;font-weight:400;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">rightaddresspool=192.168.43.5-192.168.43.5</span></div><div> </div><div> </div><div><div>conn ikev2-2nd-client</div><div>...</div><div><div>  rightid="CN=client2"</div><div>  <span style="background-color:#ffffff;color:#333333;float:none;font-family:'helvetica neue' , 'helvetica' , 'arial' , sans-serif;font-size:14px;font-style:normal;font-weight:400;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">rightaddresspool=192.168.43.6-192.168.43.6</span></div><div> </div><div><span style="background-color:#ffffff;color:#333333;float:none;font-family:'helvetica neue' , 'helvetica' , 'arial' , sans-serif;font-size:14px;font-style:normal;font-weight:400;text-decoration-style:initial;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">And client was bind to ip based on they certificate =)</span></div></div></div><div> </div></div><div><br /></div><div><br /></div><div>23.04.2020, 17:04, "Paul Wouters" <paul@nohats.ca>:</div><blockquote><p>On Thu, 23 Apr 2020, None None wrote:<br /><br /></p><blockquote class="b4fd5cf2ec92bc68cb898700bb81355fwmi-quote"> Please advice me,<br /> how i can assign rightaddresspool (IP) for users based on his certificates(IKEv2)?<br />  <br /> I.e.<br /> i'm issue 2 certificate vpn.user1 and vpn.user2<br /> and want that vpn.user1 always got x.x.x.32 ip<br /> and  vpn.user1 always got x.x.x.33 ip<br /></blockquote><p><br />Currently, that is not possible unfortunately.<br /><br />Users are given back their old lease IP whenever we can, so it does<br />remain fairly static if your addresspool is big enough.<br /><br />I agree it would be good to work on this as a feature.<br /><br />If your deployment is very small, instead of one conn, you can have<br />one conn per user and set each with a separate rightsubnet=IPaddress/32<br /><br />A fairly simple solution could be to write code for a new option in the<br />/etc/ipsec.secrets file (or a new file) that uses:<br /><br />@userid :IP 1.2.3.4<br /><br />But currently, we don't have that.<br /><br />Paul<br /></p></blockquote>