[strongSwan] updown script + stats

Martin Willi martin at strongswan.org
Thu Apr 4 10:13:58 CEST 2013


> In an updown script it seems that $PLUTO_PEER gives me the public
> address of the VPN user.  Is there any way to get the VPN address
> assigned to the user (i.e. the 10.x.x.x address).

Yes, just have a look at the default updown script, it explains all
variables supported. PLUTO_MY_SOURCEIP is the virtual IP, see [1].

> On a related note, I would like to log usage stats for each
> $PLUTO_PEER_ID as the disconnect.   Are the usage stats for the
> current session available in the updown script?

No, updown script currently does not support usage stats for CHILD_SAs.

> Is there any better way to record usage stats per connected id?

The eap-radius backend supports the collection of statistics if RADIUS
Accounting is enabled, but it requires an AAA backend, see [2]. You can
find the implementation at [3].



More information about the Users mailing list