<html><body><span style="display:block;" class="xfm_84277797"><div><span style="font-family:Arial;font-size:12pt;line-height:14pt;">Ok, I got It, thank you for helping.</span></div>
<div><span style="font-family:Arial;font-size:12pt;line-height:14pt;"><br data-mce-bogus="1"/></span></div>
<div><br/></div>
<div><i><span style="font-size:10pt;line-height:12pt;"><span style="font-family:Arial;">30 августа 2021, 11:28:41, от "Paul Wouters" <</span><a href="mailto:paul@nohats.ca" target="_blank"><span style="font-family:Arial;">paul@nohats.ca</span></a><span style="font-family:Arial;">>:</span></span></i></div>
<div><br/></div>
<blockquote style="border-left:1px solid #cccccc;margin:0px 0px 0px 0.8ex;padding-left:1ex;">
<pre style="margin:5px 0;">On Fri, 27 Aug 2021, Валентин Росавицкий wrote:

> Is It possible to assign static ip for users when using psk+xauth?
> If static ip possibe from client (right) side will be fine too.


> I use default config like:
> conn xauth-psk
>  auto=add
>  leftsubnet=0.0.0.0/0
>  rightaddresspool=10.3.0.50-10.3.0.250
>  modecfgdns="8.8.8.8 8.8.4.4"
>  leftxauthserver=yes
>  rightxauthclient=yes
>  leftmodecfgserver=yes
>  rightmodecfgclient=yes
>  modecfgpull=yes
>  xauthby=file
>  fragmentation=yes
>  cisco-unity=yes
>  also=shared

       xauthby
            When IKEv1 XAUTH support is available, set the method used by XAUTH to authenticate the user with
            IKEv1. The currently supported values are file (the default), pam or alwaysok. The password file is
            located at /etc/ipsec.d/passwd, and follows a syntax similar to the Apache htpasswd file, except an
            additional connection name argument (and optional static IP address) are also present:

                  username:password:conname:ipaddress


So you can add "special" users with static IP by adding:

        myname:mypass:xauth-psk:10.3.0.49

Be careful not to assign static IP's from the addresspool= defined, or
you will get clashes.

Paul

</pre>
</blockquote></span></body></html>