[strongSwan] updown script + stats
Martin Willi
martin at strongswan.org
Thu Apr 4 10:13:58 CEST 2013
Hi,
> 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].
Regards
Martin
[1]http://git.strongswan.org/?p=strongswan.git;a=blob;f=src/_updown/_updown.in;hb=HEAD#l75
[2]http://www.strongswan.org/uml/testresults/ikev2/rw-radius-accounting/index.html
[3]http://git.strongswan.org/?p=strongswan.git;a=blob;f=src/libcharon/plugins/eap_radius/eap_radius_accounting.c;hb=HEAD
More information about the Users
mailing list