Script to open specific URL on openvpn client connection

  • 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.

  • @apuh

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


  • @noplan

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

  • @apuh

    ah ok thats cool

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


  • LAYER 8 Rebel Alliance

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

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


  • @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.

  • @Rico

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

Log in to reply