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

    OpenVPN on 2.7.1 crashes on some circumstances

    OpenVPN
    10
    22
    2.9k
    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.
    • V
      Volui
      last edited by A Former User

      Hi there! I recently update my installation from 2.7 to 2.7.1 and I have discovered some strange issue after it:
      I have 3 tunnels running on my server, two in UDP mode on non-default openvpn ports, and one in TCP mode on port 443 (just as a backup option). All tunnels works just fine for months without any issues. On TCP 443 tunnel i can see (obvious) many connection attempts\portscans but it has never affected the performance of the service itself. Now, after upgrade, it's work just fine, mine clients as before may connect to TCP server vithout any problem and connection still stable. But somtimes, someone from unknown to me IP tries to connect to that (TCP) server and it crashes. Server may work couple of days before that someone unknown tries to connect and it causes the service to crash. All servers configured in same type: Mode: Remote Access ( SSL/TLS + User Auth ) Data Ciphers: AES-256-GCM Digest: SHA256 D-H Params: 2048 bits. There some logs from server, all time when service crash it has same record on log files:

      On openvpn.log:
      Nov 18 09:02:38 pf openvpn[11964]: 62.233.50.179:65059 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
      Nov 18 09:02:38 pf openvpn[11964]: 62.233.50.179:65059 TLS Error: TLS handshake failed

      Nov 20 16:45:37 pf openvpn[12689]: 147.235.216.91:11353 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
      Nov 20 16:45:37 pf openvpn[12689]: 147.235.216.91:11353 TLS Error: TLS handshake failed

      On system.log:
      Nov 18 09:02:38 pf kernel: pid 11964 (openvpn), jid 0, uid 0: exited on signal 11 (core dumped)
      Nov 18 09:02:38 pf kernel: ovpns1: link state changed to DOWN

      Nov 20 16:45:37 pf kernel: pid 12689 (openvpn), jid 0, uid 0: exited on signal 11 (core dumped)
      Nov 20 16:45:37 pf kernel: ovpns1: link state changed to DOWN

      In same time legitimate clients can connect and operate vithout any problems.

      On UDP tunnels i don't have that problem just because it sit on hi-range ports and no one dont try to connect to it excluding legitimate clients

      My config is: i5-2540M CPU with 4GB RAM and 60GB SSD, two GigE adapters (Intel and Marvell). I'am already have run a Memtest 6.20 (3 passes without error) and check if CPU will overheating (they not).

      This is not so much a request for help with solving a problem as an attempt to draw attention to its very existence. Although I do not rule out that this is a problem solely with my installation.

      P.S. I restarted that tunnel with log verbosity level 6 and I'll just wait until it crashes again.

      O 2 Replies Last reply Reply Quote 0
      • O
        ogghi @Volui
        last edited by

        @Volui-0
        Hi there, no solution from my end, but just wanting to say: Affected, too!

        We had a difficult upgrade from 2.6.0 to 2.7.0 where the SSD was not booting anymore. Installed fresh 2.7.1 over it (could not even find 2.6.0 image to download) and imported settings backup.
        All was up and working again.

        Only issue is the VPN server (UDP port 1443 here) crashing randomly. I'll now monitor the system.log.
        Any other log file to look at?

        OpenVPN 2.6.7 amd64-portbld-freebsd14.0 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [MH/RECVDA] [AEAD] [DCO]
        library versions: OpenSSL 3.0.12 24 Oct 2023, LZO 2.10
        Is what is currently installed on here

        1 Reply Last reply Reply Quote 0
        • O
          ogghi @Volui
          last edited by

          @Volui-0
          As found on a Reddit post:

          There was a patch to openvpn that you can install using the CLI.
          openvpn: 2.6.7 -> 2.6.7_1 [pfSense]

          pkg upgrade

          I did this and restarted the VPN server in question, hoping it's enough. Let's see!

          V 1 Reply Last reply Reply Quote 0
          • V
            Volui @ogghi
            last edited by

            @ogghi
            I will waiting until it crashes again with more verbose log and try to catch the bug in it with extended info about it. Then, i will post that logs there and try your solution, thanks!

            1 Reply Last reply Reply Quote 1
            • V
              Volui
              last edited by

              Ok, the server crashed again. The more detailed log didn't show much, but here it is nonetheless:

              openvpn.log:
              Nov 23 04:33:51 pf openvpn[56470]: MULTI: multi_create_instance called
              Nov 23 04:33:51 pf openvpn[56470]: Re-using SSL/TLS context
              Nov 23 04:33:51 pf openvpn[56470]: Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
              Nov 23 04:33:51 pf openvpn[56470]: Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
              Nov 23 04:33:51 pf openvpn[56470]: Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
              Nov 23 04:33:51 pf openvpn[56470]: Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
              Nov 23 04:33:51 pf openvpn[56470]: Control Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1250 tun_max_mtu:0 headroom:126 payload:1600 tailroom:126 ET:0 ]
              Nov 23 04:33:51 pf openvpn[56470]: Data Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]
              Nov 23 04:33:51 pf openvpn[56470]: TCP connection established with [AF_INET]45.79.168.172:34222
              Nov 23 04:33:51 pf openvpn[56470]: TCPv4_SERVER link local: (not bound)
              Nov 23 04:33:51 pf openvpn[56470]: TCPv4_SERVER link remote: [AF_INET]45.79.168.172:34222
              Nov 23 04:33:53 pf openvpn[56470]: MULTI: multi_create_instance called
              Nov 23 04:33:53 pf openvpn[56470]: Re-using SSL/TLS context
              Nov 23 04:33:53 pf openvpn[56470]: Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
              Nov 23 04:33:53 pf openvpn[56470]: Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
              Nov 23 04:33:53 pf openvpn[56470]: Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
              Nov 23 04:33:53 pf openvpn[56470]: Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
              Nov 23 04:33:53 pf openvpn[56470]: Control Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1250 tun_max_mtu:0 headroom:126 payload:1600 tailroom:126 ET:0 ]
              Nov 23 04:33:53 pf openvpn[56470]: Data Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]
              Nov 23 04:33:53 pf openvpn[56470]: TCP connection established with [AF_INET]45.79.168.172:34218
              Nov 23 04:33:53 pf openvpn[56470]: TCPv4_SERVER link local: (not bound)
              Nov 23 04:33:53 pf openvpn[56470]: TCPv4_SERVER link remote: [AF_INET]45.79.168.172:34218
              Nov 23 04:33:57 pf openvpn[56470]: 45.79.168.172:34215 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
              Nov 23 04:33:57 pf openvpn[56470]: 45.79.168.172:34215 TLS Error: TLS handshake failed

              system.log:
              Nov 23 04:33:57 kernel pid 56470 (openvpn), jid 0, uid 0: exited on signal 11 (core dumped)
              Nov 23 04:33:57 kernel ovpns1: link state changed to DOWN

              In openvpn.log there several connection attempts in a row from the same IP address, then the server crashed. Now all that remains is to try the solution suggested by ogghi above (pkg upgrade). I hope this works.

              O 1 Reply Last reply Reply Quote 0
              • O
                ogghi @Volui
                last edited by

                @Volui-0
                I think it will work.
                It hasn't crashed here anymore!

                I am wondering if there is any official statement from Netgate or so?

                V 1 Reply Last reply Reply Quote 0
                • V
                  Volui @ogghi
                  last edited by

                  @ogghi
                  Yes, I also updated the OpenVPN package via pkg upgrade and now all that remains is to monitor the stability of the server. You are right, it looks like netgate has updated the openvpn package in its repository since the release of 2.7.1, but has not said anything about it anywhere. In any case, pkg upgrade is the only thing we can do about this problem for now.

                  1 Reply Last reply Reply Quote 1
                  • O
                    ogghi
                    last edited by

                    It seems stable here in regards to disconnects, but people using remote desktop sometimes get some timeouts as it seems. Keeping an eye on logs today.

                    Happy Monday ppl!

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

                      OpenVPN released OpenVPN 2.6.8 which addresses a segfault that some users see with 2.6.7:

                      https://github.com/OpenVPN/openvpn/issues/449

                      https://openvpn.net/community-downloads/

                      We're still discussing what the best course of action is to address it since it doesn't seem to be widespread.

                      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!

                      S 1 Reply Last reply Reply Quote 1
                      • S
                        slu @jimp
                        last edited by slu

                        @jimp
                        we are also affected by random openvpn crashes, this setup running before over 8 years without any issue.

                        There are many different openvpn clients and version on this server, maybe this combination trigger the issue more...

                        pfSense Gold subscription

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

                          We'll be bringing in OpenVPN 2.6.8 to the next patch release (Plus 23.09.1, CE 2.7.2) which should be out here in the next week or so if all goes according to plan.

                          https://redmine.pfsense.org/issues/15049

                          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!

                          M 1 Reply Last reply Reply Quote 4
                          • M
                            michmoor LAYER 8 Rebel Alliance @jimp
                            last edited by

                            @jimp
                            Hey Jim. Any release notes on 23.09.1 ?

                            Firewall: NetGate,Palo Alto-VM,Juniper SRX
                            Routing: Juniper, Arista, Cisco
                            Switching: Juniper, Arista, Cisco
                            Wireless: Unifi, Aruba IAP
                            JNCIP,CCNP Enterprise

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

                              @michmoor said in OpenVPN on 2.7.1 crashes on some circumstances:

                              @jimp
                              Hey Jim. Any release notes on 23.09.1 ?

                              Nothing public yet, but it's primarily security/stability things. The ZFS corruption bug, OpenVPN needed a version bump, so did strongSwan, various fixes in PHP code. Not a long list, but significant enough to warrant a patch release.

                              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!

                              M 1 Reply Last reply Reply Quote 3
                              • M
                                michmoor LAYER 8 Rebel Alliance @jimp
                                last edited by

                                @jimp
                                sounds good to me. thanks!

                                Firewall: NetGate,Palo Alto-VM,Juniper SRX
                                Routing: Juniper, Arista, Cisco
                                Switching: Juniper, Arista, Cisco
                                Wireless: Unifi, Aruba IAP
                                JNCIP,CCNP Enterprise

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

                                  FYI- If you are on Plus 23.09 or CE 2.7.1 we picked back the update to the current repositories so you can also get OpenVPN 2.6.8_1 right now from the console or SSH shell prompt:

                                  # pkg update
                                  # pkg upgrade -y openvpn
                                  

                                  And then either restart each instance manually or reboot.

                                  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!

                                  T O 2 Replies Last reply Reply Quote 2
                                  • T
                                    tedquade @jimp
                                    last edited by

                                    @jimp Done.

                                    Thanks
                                    Ted

                                    1 Reply Last reply Reply Quote 0
                                    • O
                                      OhYeah 0 @jimp
                                      last edited by

                                      @jimp said in OpenVPN on 2.7.1 crashes on some circumstances:

                                      FYI- If you are on Plus 23.09 or CE 2.7.1 we picked back the update to the current repositories so you can also get OpenVPN 2.6.8_1 right now from the console or SSH shell prompt:

                                      # pkg update
                                      # pkg upgrade -y openvpn
                                      

                                      And then either restart each instance manually or reboot.

                                      We had one virtual instance of pfsense that had the OpenVPN remote access server crash every 2-3 days. After pkg update the server has been running without problems for 5+ days.

                                      S T 2 Replies Last reply Reply Quote 1
                                      • S
                                        slu @OhYeah 0
                                        last edited by

                                        We can confirm this, no issue since 2.6.8_1, thank you @jimp

                                        Simply reinstall of the package openvpn-client-export does also the OpenVPN upgrade.

                                        pfSense Gold subscription

                                        1 Reply Last reply Reply Quote 0
                                        • T
                                          thuyetti @OhYeah 0
                                          last edited by

                                          @OhYeah-0 said in OpenVPN on 2.7.1 crashes on some circumstances:

                                          @jimp said in OpenVPN on 2.7.1 crashes on some circumstances:

                                          FYI- If you are on Plus 23.09 or CE 2.7.1 we picked back the update to the current repositories so you can also get OpenVPN 2.6.8_1 right now from the console or SSH shell prompt:

                                          # pkg update
                                          # pkg upgrade -y openvpn
                                          

                                          And then either restart each instance manually or reboot.

                                          We had one virtual instance of pfsense that had the OpenVPN remote access server crash every 2-3 days. After pkg update the server has been running without problems for 5+ days.

                                          Thank you a lot @jimp , it works for me since more than 20 days now. We have 3 OpenVPN servers.

                                          1 Reply Last reply Reply Quote 0
                                          • V
                                            Volui
                                            last edited by A Former User

                                            It's seems to be solved for now (running almost month without crashes). To solve problem do from console from root:

                                            pkg update
                                            pkg upgrade -y openvpn

                                            Or just upgrade to latest release! For me, openVPN run as rock solid after i do upgraded the package and then update system to the latest stable release 2.7.2! Thanks All Guys!

                                            1 Reply Last reply Reply Quote 0
                                            • L Luvirini referenced this topic on
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.