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

    How to restart Specific OpenVPN thanks to script at specific time

    Scheduled Pinned Locked Moved OpenVPN
    2 Posts 2 Posters 755 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.
    • P
      pfsense7515
      last edited by

      Hello,

      We have lot of openvpn tunnel with our pfsense firewall. For only openvpn tunnel for unknow reason, we lost connection and we need to restart manually this tunnel. It's possible to relaunch a specific openvpn tunnel thanks to script at specific time (for example cron).

      Thank You for your help

      Best Regards

      kiokomanK 1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8 @pfsense7515
        last edited by

        @pfsense7515

        if it's a server

        /usr/local/sbin/pfSsh.php playback svc restart openvpn server 1
        

        if it's a client

        /usr/local/sbin/pfSsh.php playback svc restart openvpn client 1
        

        server/client can be 1 or 2 or 3 etc etc

        check with

        ps uxaww | grep openvpn
        

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

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