This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Command Line SSL VPN scripting

I am trying to set up a computer for a permanent remote office use but still maintain computer security policy, password synchronization, updates, etc... with the business network.  This computer will only get used a couple of days a week and the rest of the week the user works at the office.

What I would like to do is automate VPN to log in and write scripts for everything that I need to update.  I am running into a couple of issues with this.

I found the article on how to automate the SSL VPN client to sign in with an external username/password answer file and to put that in the Startup folder.  The issue that I'm experiencing is that on startup the SSL VPN tray icon also tries to open like normal and I get an "already running" error message which I would like to remove to avoid confusion.

Other than that I don't have any issue with establishing the VPN tunnel automatically, scripting however is presenting a challenge.  My first attempt I wanted to launch the VPN tunnel, run my scripts, lets just use gpupdate for an example, then close the VPN when it has completed.  On launching the VPN tunnel the CMD window opens, VPN starts but it never launches the gpupdate script.  I can however launch the gpupdate script after the connection is established, but I'd really like to just sequentially connect, update, disconnect.

I am also looking for a way to close the VPN tunnel after my scripts run.  The only reason that I really need the VPN connection is to let the PC connect to the host network to synchronize system information, the user is able to perform their job through the use of secure web portals so don't need it to actually do their work.  In fact VPN sort of incumbers their ability to work since it is mostly web research and the bandwidth reduction of using a VPN tunnel versus the full bandwidth of the full home Internet connection is pretty restrictive.

Any ideas on how to get rid of the "already running" message and better script my update processes?  Thanks!



This thread was automatically locked due to age.
Parents
  • I did find the registry entry for the SSL VPN's instance in the tray area and was able to remove that, which allowed the autologin version to execute without error and the scheduled task to run for updating the stuff that I would like to update.  So I was able to make everything that I wanted to happen, happen, but I would still be interested in trying to find a more linear way to do it that doesn't involve me having to leave a VPN connection open after my synchronization completes.

  • Eight years ago, Sascha Paris described how to Run Preconnect/Connect/Disconnect Scripts with OpenVPN.  Did that help?

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Reply Children
No Data