Mapping drives when connecting

I have some mobile users that need to access network drives when they connect remotely. The Watchguard VPN doesn't seem to have any options to run a script when it establishes a connection. Is there any way to map these connections without asking the user to run a script manually?

Comments

  • Hi, Nate
    Maybe a scheduled task could work, that triggers on an event id?
    For instance, when I connect the IKEv2 VPN an event 20225 is registered that tells me I'm successfully connected through RAS.

    I haven't tried this myself but our users have a similar problem and I'm inclined to try it out.

  • edited August 2022

    Late to the game as we just start using Mobile SSL VPN. Here's my solution. I created ANOTHER bat file and called the 2 applications (WGSSL & the map drive script). I added a pause in between so users could enter their password to the VPN client and press "Connect". Then once they're done, they "press any key" to continue the original bat file.. then it called the map drives script to run through mapping the drives. I also have it running a gpupdate to force any new GPO's that may have been improved or added since last time they connected to the VPN. Here's a copy of the BAT file script to accomplish all this:

    :: Hide Console Information
    @echo off

    :: Run VPN Client
    cd "C:\Program Files (x86)\WatchGuard\WatchGuard Mobile VPN with SSL"
    start wgsslvpnc.exe

    :: Waiting for user to press "Connect", then they can press any key to map drives
    echo.Once VPN is connected, press any key to map drives...
    pause >nul

    :: Batch file to map drives and auto exit (C:Remote is where I have their map drives scripts on their computers).. You can change this location to serve your environment
    cd "C:\Remote"
    start map_drives.bat

    :: Group Policy Force Update at every VPN Login
    gpupdate /force

    And that's it..

    So in my C:\Remote of every workstation is the following:

    map_drives.bat (standard map drives scripting)
    rsisslvpn.bat (with the code above)

    Then create a shortcut to the rsisslvpn.bat to the Desktop of the computer.

    I also changed the icon and used the wgsslvpnc.exe for the icon, so it doesn't look like a batch file.

    Viola!

    Let me know if you have any questions.

    --Rob Fassett

    Here's a screenshot to better understand everything.

  • You can also use the OpenVPN client, which supports the running of a script at connection.
    The WG SSLVPN is a modified OpenVPN client.

    Here is an example for the Windows OpenVPN client:
    https://think.unblog.ch/en/openvpn-connection-script/

    Also review this:
    Use Mobile VPN with SSL with an OpenVPN Client
    https://www.watchguard.com/help/docs/help-center/en-US/Content/en-US/Fireware/mvpn/ssl/mvpn_ssl_ovpn_profile_c.html

Sign In to comment.