Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    OpenVPN automatic mapping of Windows server drives

    Scheduled Pinned Locked Moved OpenVPN
    4 Posts 3 Posters 787 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      CityUnionMission
      last edited by

      Hi everyone:

      We're trying to figure out how to get OpenVPN to automatically map drive(s) for a user that logs into OpenVPN from the outside. Anyone know how to get this done?

      Thanks.

      M 1 Reply Last reply Reply Quote 0
      • M
        marvosa @CityUnionMission
        last edited by marvosa

        @cityunionmission
        I believe there are commands to run a script or batch file upon connection. So, you'd need to create the script/batch file, place a copy on each client, and then add the appropriate command(s) to the client config.

        Here's an interesting alternative solution that involves leveraging the task scheduler to execute a batch file -> https://forums.openvpn.net/viewtopic.php?t=24130

        D 1 Reply Last reply Reply Quote 0
        • D
          dholub @marvosa
          last edited by

          @marvosa Are you aware of any good examples of just leveraging native commands as part of a PFSense custom config?

          Have attempted:

          script-security 2 system
          route-up “net use O: \\<fileshareIP>\”
          

          To no avail. Would like to avoid having to distribute a script and manage it on all clients, but rather control centrally in the VPN config.

          M 1 Reply Last reply Reply Quote 0
          • M
            marvosa @dholub
            last edited by

            @dholub
            Unfortunately, no. Everything I've pulled up on both the "up" and "route-up" directives references info on running a script of some sort.

            Have you found anything?

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.