[Swan] Static ip per user

Paul Wouters paul at nohats.ca
Mon Aug 30 08:28:37 UTC 2021

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=
>  rightaddresspool=
>  modecfgdns=""
>  leftxauthserver=yes
>  rightxauthclient=yes
>  leftmodecfgserver=yes
>  rightmodecfgclient=yes
>  modecfgpull=yes
>  xauthby=file
>  fragmentation=yes
>  cisco-unity=yes
>  also=shared

            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:


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


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


More information about the Swan mailing list