• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 Jun 15, 2020, 1:09 PM

    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.

    N 1 Reply Last reply Jun 15, 2020, 1:46 PM Reply Quote 0
    • N
      noplan @apuh
      last edited by Jun 15, 2020, 1:46 PM

      @apuh

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

      NP

      A 1 Reply Last reply Jun 16, 2020, 5:47 AM Reply Quote 0
      • A
        apuh @noplan
        last edited by Jun 16, 2020, 5:47 AM

        @noplan

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

        N 1 Reply Last reply Jun 16, 2020, 7:23 AM Reply Quote 0
        • N
          noplan @apuh
          last edited by Jun 16, 2020, 7:23 AM

          @apuh

          ah ok thats cool

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

          brNP

          A 1 Reply Last reply Jun 16, 2020, 7:34 AM Reply Quote 1
          • R
            Rico LAYER 8 Rebel Alliance
            last edited by Jun 16, 2020, 7:31 AM

            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

            N 1 Reply Last reply Jun 16, 2020, 7:40 AM Reply Quote 0
            • A
              apuh @noplan
              last edited by Jun 16, 2020, 7:34 AM

              @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
              • N
                noplan @Rico
                last edited by Jun 16, 2020, 7:40 AM

                @Rico

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

                1 Reply Last reply Reply Quote 0
                7 out of 7
                • First post
                  7/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received