[strongSwan] how to get the virtual ip in a program
    Martin Willi 
    martin at strongswan.org
       
    Fri Jun  1 13:38:34 CEST 2012
    
    
  
Hi Nitin,
> I want to know is there any system level variable or container that
> stores the virtual IP assigned by the strongSwan server to the
> strongSwan client's interface.
When using the attr-sql [1] pool backend, you can use "ipsec pool
--leases" on the server to list all leases. When using a pool directly
defined in ipsec.conf, "ipsec leases" lists all IP leases.
If you need that information on the client itself, you'd have to read
the IP directly from the interface, parse "ipsec statusall" or extend
the stroke (or any other) interface by such a function.
Regards
Martin
[1]http://wiki.strongswan.org/projects/strongswan/wiki/AttrSQL
    
    
More information about the Users
mailing list