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

    Script to open specific URL on openvpn client connection

    Scheduled Pinned Locked Moved OpenVPN
    7 Posts 3 Posters 1.5k 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.
    • A
      apuh
      last edited by

      Hi.
      I would like that when I connect to the vpn server with my openvpn client, a script would automatically open a specific URL (like a login page). Ive tried to create a simple up.bat file into my pfsense with the start parameter, that should open the website on windows. I give the path in the advanced configuration box in client export settings in openvpn config using "up" parameter. But when trying to start the client, it tells that the process doesn't exist. I have given it the absolute path.

      Is there some specific place to store the script so that it can be used or is it even possible to store it on the server and distribute it to the remote machine with the client install package.

      noplanN 1 Reply Last reply Reply Quote 0
      • noplanN
        noplan @apuh
        last edited by

        @apuh

        out of the blue for what use case is that usefull ?

        NP

        A 1 Reply Last reply Reply Quote 0
        • A
          apuh @noplan
          last edited by

          @noplan

          When there is a monitoring server behind the vpn connection with a web ui. When connected it would automatically open that URL.

          noplanN 1 Reply Last reply Reply Quote 0
          • noplanN
            noplan @apuh
            last edited by

            @apuh

            ah ok thats cool

            so openVPN connection established --> then open https url in browser ?

            brNP

            A 1 Reply Last reply Reply Quote 1
            • RicoR
              Rico LAYER 8 Rebel Alliance
              last edited by

              I just tried this .bat and it's working for me:

              "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-tab "172.17.9.81/smokeping"
              

              -Rico

              noplanN 1 Reply Last reply Reply Quote 0
              • A
                apuh @noplan
                last edited by

                @noplan

                Yes, Im still a novice in this field and don't really get the requirements for the script to work other than it needs the script-security 2. And does it require a distribution of the script first , meaning that it needs to be stored on the client side machine for it to work.

                1 Reply Last reply Reply Quote 0
                • noplanN
                  noplan @Rico
                  last edited by

                  @Rico

                  f*';= /me toooo slow ;)
                  thx ;)

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