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

kill openvpn_client after n seconds

Scheduled Pinned Locked Moved OpenVPN
8 Posts 2 Posters 835 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
    alivdel
    last edited by Oct 25, 2018, 10:45 AM

    Hello all,
    is there any way or option to disconnect an openvpn_client after n seconds no matter if it is idle or not?
    thanks.

    1 Reply Last reply Reply Quote 0
    • G
      Gertjan
      last edited by Oct 29, 2018, 7:30 AM

      Hi,

      The VPN client is pfSense ? Running on a PC used to connect to pfSense ?

      The criteria "n seconds" could be enforced by VPN+FreeRadius if "n" is not to small, like several minutes.

      No "help me" PM's please. Use the forum, the community will thank you.
      Edit : and where are the logs ??

      A 1 Reply Last reply Oct 29, 2018, 7:50 AM Reply Quote 0
      • A
        alivdel @Gertjan
        last edited by Oct 29, 2018, 7:50 AM

        @gertjan hi thanks for reply, both Client and Server are pfSense and i would like to kill Client after 4 hours automatically.
        I did this with a simple script file on pfSense 2.3.2 earlier, but after upgrading to 2.4.x it doesn't work somehow.
        thats why i was looking for a way maybe in VPN_Configuration to do same Job.

        1 Reply Last reply Reply Quote 0
        • G
          Gertjan
          last edited by Oct 29, 2018, 7:55 AM

          I'm pretty sure that your script can be adapted for the most recent version.

          Can you show the script ?

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          A 1 Reply Last reply Oct 29, 2018, 8:03 AM Reply Quote 0
          • A
            alivdel @Gertjan
            last edited by Oct 29, 2018, 8:03 AM

            @gertjan
            ya it works if I run it manually, but the Problem is if i put in rc.d directory to execute it on startup.
            that's another reason i can't edit it because it works without problem if execute it manually.
            unfortunately i dont have access to the file now.

            1 Reply Last reply Reply Quote 0
            • G
              Gertjan
              last edited by Oct 29, 2018, 8:34 AM

              No need to put a file in the "rc.d direcory".
              I advise you to use the Shellcmd package :

              0_1540802024837_234b4f64-77d1-4d71-8d71-a98130288df0-image.png

              and/or the Cron package :
              0_1540802063743_6ee28d5d-7d0c-4839-b1d9-2f27644a8139-image.png

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              A 1 Reply Last reply Oct 29, 2018, 8:38 AM Reply Quote 0
              • A
                alivdel @Gertjan
                last edited by Oct 29, 2018, 8:38 AM

                @gertjan
                thanks for the advise, i will test it with one of These packages.
                for my Information can you tell me please whats the problem to put a file in rc.d directory?

                G 1 Reply Last reply Oct 29, 2018, 10:08 AM Reply Quote 0
                • G
                  Gertjan @alivdel
                  last edited by Oct 29, 2018, 10:08 AM

                  @alivdel said in kill openvpn_client after n seconds:

                  for my Information can you tell me please whats the problem to put a file in rc.d directory?

                  None ☺
                  If you know how to write startup (stop) scripts for FreeBSD (pfSense), then it should work just fine.

                  No "help me" PM's please. Use the forum, the community will thank you.
                  Edit : and where are the logs ??

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