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

    How to turn off OpenVPN server from Shell?

    Scheduled Pinned Locked Moved General pfSense Questions
    2 Posts 2 Posters 11.4k 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.
    • T
      torontob
      last edited by

      Hi Everyone,

      I have been playing with OpenVPN today and I think I set a wrong subnet in the PUSH and now I can't get to the WebConfigurator but I can get to the Shell.

      I want to run some sort of a loop on the shell using a cronjob in the shell to do a stop of OpenVPN and start it again after 2 minutes if I loose connection.

      Can someone please post the command to run the cron and to stop and start OpenVPN? Unfortunately I am only familiar with CentOS and it's as easy as "service openvpn stop/start" there.

      Thanks

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Just do:

        killall -9 openvpn
        

        That should terminate any running OpenVPN process and, I believe it should also remove the routes.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

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