Dienstag, 3. August 2010

Automate vpnclient log-in

In Ubuntu 10.04 (Lucid)
  1. Edit /etc/CiscoSystemsVPNClient/vpnclient.ini, add following codes

    [main]
    EnableLog=0
    AutoInitiationEnable=1
    AutoInitiationRetryInterval=3
    AutoInitiationList=uni
    [uni]
    Network=192.168.0.0
    Mask=255.255.255.0
    ConnectionEntry=uni-**-vpn
    [LOG.IKE]
    LogLevel=3
    [LOG.CM]
    LogLevel=3
    [LOG.CVPND]
    LogLevel=3
    [LOG.XAUTH]
    LogLevel=3
    [LOG.CERT]
    LogLevel=3
    [LOG.IPSEC]
    LogLevel=3
    [LOG.CLI]
    LogLevel=3

    Add three items in the 'main' section: 'AutoInitiationEnable', 'AutoInitiationRetryInterval' and 'AutoinitiationList'. The interval is in the unit of minute, and the 'AutoinitiationList' points to the section which records the vpn-profile to use. Hence it is not necessarily the name of the vpn profile used
  2. Add the section 'uni' or the name you specified in the main section. 'Network' records the IP address range in which the vpn will start (here is 192.168.0.0 since my desktop sits behind a router). 'Mask' is the network mask, and the 'ConnectionEntry' is the vpn profile you want to automatically connect
  3. Modify the vpn profile file (normally saved under /etc/CiscoSystemsVPNClient/Profiles/). Especially change the Username, UserPassword and SaveUserPassword)

Keine Kommentare: