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

    OpenVPN idle disconnection

    Scheduled Pinned Locked Moved OpenVPN
    6 Posts 3 Posters 747 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.
    • darkthroneD
      darkthrone
      last edited by

      OpenVPN SSL+user authentication automatically how disconnect when connection is idle ?

      JKnottJ 1 Reply Last reply Reply Quote 0
      • JKnottJ
        JKnott @darkthrone
        last edited by

        @darkthrone

        ????

        OpenVPN uses UDP. There is no connection to disconnect when idle. Or do you mean you want the tunnel to shut down and reauthenticate when there's traffic?

        PfSense running on Qotom mini PC
        i5 CPU, 4 GB memory, 32 GB SSD & 4 Intel Gb Ethernet ports.
        UniFi AC-Lite access point

        I haven't lost my mind. It's around here...somewhere...

        1 Reply Last reply Reply Quote 0
        • darkthroneD
          darkthrone
          last edited by

          I found such a setting in the forums

          alt metni

          Is it possible?

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by johnpoz

            https://openvpn.net/community-resources/reference-manual-for-openvpn-2-4/

            inactive n [bytes]
            Causes OpenVPN to exit after n seconds of inactivity on the TUN/TAP device. The time length of inactivity is measured since the last incoming or outgoing tunnel packet. The default value is 0 seconds, which disables this feature.If the optional bytes parameter is included, exit if less than bytes of combined in/out traffic are produced on the tun/tap device in n seconds.

            In any case, OpenVPN’s internal ping packets (which are just keepalives) and TLS control packets are not considered “activity”, nor are they counted as traffic, as they are used internally by OpenVPN and are not an indication of actual user activity.

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • darkthroneD
              darkthrone
              last edited by

              what should we write in this field?

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                What do you want to disconnect on? If less then X bytes in Y seconds.. Or just leave off bytes and put in how many seconds of idle (no traffic) and then will be disconnected.. If you wanted to disconnect after an hour it would be 3600

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

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