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

    Stale WG session ?

    Scheduled Pinned Locked Moved WireGuard
    36 Posts 6 Posters 4.6k 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.
    • chudakC
      chudak @cmcdonald
      last edited by

      @cmcdonald said in Stale WG session ?:

      @chudak And if you toggle the iOS client on and off everything starts working again?

      Precisely

      1 Reply Last reply Reply Quote 0
      • chudakC
        chudak
        last edited by

        @cmcdonald

        This is extremely annoying :(

        Wonder if you had a chance to find a suspect?

        cmcdonaldC 1 Reply Last reply Reply Quote 0
        • cmcdonaldC
          cmcdonald Netgate Developer @chudak
          last edited by

          @chudak Try the latest package version 0.1.5_3, which includes a pretty significant fix that impacts handshakes.

          Need help fast? https://www.netgate.com/support

          chudakC 1 Reply Last reply Reply Quote 0
          • chudakC
            chudak @cmcdonald
            last edited by

            @cmcdonald said in Stale WG session ?:

            @chudak Try the latest package version 0.1.5_3, which includes a pretty significant fix that impacts handshakes.

            Thanks
            But I will wait for it to be in stable release
            Any clues for its eta?

            @cmcdonald said in Stale WG session ?:

            @chudak Try the latest package version 0.1.5_3, which includes a pretty significant fix that impacts handshakes.

            cmcdonaldC 1 Reply Last reply Reply Quote 0
            • cmcdonaldC
              cmcdonald Netgate Developer @chudak
              last edited by

              @chudak Should in all stable branches now.

              Need help fast? https://www.netgate.com/support

              chudakC 1 Reply Last reply Reply Quote 0
              • chudakC
                chudak @cmcdonald
                last edited by

                @cmcdonald said in Stale WG session ?:

                @chudak Should in all stable branches now.

                Installed it, but so far not sure if this issue was fixed.

                Have you been able to reproduce it?
                Why do you think it’s fixed?

                Thx

                chudakC 1 Reply Last reply Reply Quote 0
                • chudakC
                  chudak @chudak
                  last edited by

                  @chudak
                  @cmcdonald

                  Actually, I left my iPhone on 5G network and WG connected and so far after > 3 hours, I see no problems.

                  :)

                  cmcdonaldC 1 Reply Last reply Reply Quote 0
                  • cmcdonaldC
                    cmcdonald Netgate Developer @chudak
                    last edited by

                    @chudak Thanks for the feedback! Much appreciated.

                    Need help fast? https://www.netgate.com/support

                    chudakC 1 Reply Last reply Reply Quote 0
                    • chudakC
                      chudak @cmcdonald
                      last edited by chudak

                      @cmcdonald said in Stale WG session ?:

                      @chudak Thanks for the feedback! Much appreciated.

                      I don't see a stale state as often as I used to, but it's not completely fixed AFAICS

                      I will be paying more attention and see if other users provide more data points.

                      @Lakitu78 You saw the same problem, can you see if it's better/same/worse on the latest release?

                      1 Reply Last reply Reply Quote 0
                      • chudakC
                        chudak
                        last edited by

                        @cmcdonald

                        This problem is not fixed and is very annoying :(

                        It's very simple to test - connect WG on an iPhone and see if you can use the phone for a whole day.
                        The iPhone becomes unresponsive and no DNS names get resolved until WG I disable and then activate again.

                        Please take a look at it!

                        cmcdonaldC 1 Reply Last reply Reply Quote 0
                        • cmcdonaldC
                          cmcdonald Netgate Developer @chudak
                          last edited by

                          @chudak I have not been able to replicate this issue as of yet. I have several devices that maintain connections all the time without issue. Can you upgrade to 2.6.0-RC and give v0.1.6 a test?

                          Need help fast? https://www.netgate.com/support

                          chudakC 1 Reply Last reply Reply Quote 0
                          • chudakC
                            chudak @cmcdonald
                            last edited by

                            @cmcdonald said in Stale WG session ?:

                            @chudak I have not been able to replicate this issue as of yet. I have several devices that maintain connections all the time without issue. Can you upgrade to 2.6.0-RC and give v0.1.6 a test?

                            I want to wait till 2.6.0 is released.

                            The devices that you maintain connected to WG all the time, do you turn them off or they are on all the time?

                            1 Reply Last reply Reply Quote 0
                            • H
                              hvbakel
                              last edited by

                              Just chiming in that I've seen the same issue with the official wireguard app on Android. The symptoms are the same with an always-on VPN connection that stays on for a day or more but eventually goes stale with no connectivity. A reconnect will fix the issue but it will return occasionally once every 1-3 days. I've noticed it most on first use in the morning after the phone has been idle during the night.

                              chudakC 1 Reply Last reply Reply Quote 0
                              • chudakC
                                chudak @hvbakel
                                last edited by

                                @hvbakel

                                The frequency of this problem I see on iPhone is 1-3 hours

                                E 1 Reply Last reply Reply Quote 0
                                • E
                                  ericafterdark @chudak
                                  last edited by

                                  @chudak said in Stale WG session ?:

                                  @hvbakel

                                  The frequency of this problem I see on iPhone is 1-3 hours

                                  So this is an issue on iOS with the latest WireGuard app?

                                  chudakC H 2 Replies Last reply Reply Quote 0
                                  • chudakC
                                    chudak @ericafterdark
                                    last edited by

                                    @eirikrcoquere

                                    Yes in my case

                                    And i saw somebody saying it's the same problem on Android

                                    E 1 Reply Last reply Reply Quote 0
                                    • E
                                      ericafterdark @chudak
                                      last edited by

                                      @chudak said in Stale WG session ?:

                                      @eirikrcoquere

                                      Yes in my case

                                      And i saw somebody saying it's the same problem on Android

                                      I need to give it a try. Are there any good up-to-date tutorials for setting things up in pfSense and iPhone? Last time I tried the handshake went well but I had no internet.

                                      1 Reply Last reply Reply Quote 0
                                      • H
                                        hvbakel @ericafterdark
                                        last edited by

                                        @eirikrcoquere After monitoring this for a few more days I think the stale connection in my case may be related to transitions between the home network that is behind the firewall and external mobile/wifi networks. The official WG client on my Android phone is configured with an always-on VPN connection to pfsense on the home network, using a dynamic DNS address that maps to the WAN IP.

                                        When I move from the home network to an external network there is typically no issue, but when connecting back to the home wifi the WG session often goes stale. Sometimes it's immediate, other times it is after some hours. Disabling/enabling the interface within the wireguard client fixes the issue so I'm not sure if it is an underlying issue with the way the home network is configured (pure NAT), or whether there is something in the handoff between networks that goes amiss under certain conditions. It does not seem related to e.g. changes in the IP address on the WAN interface because that typically remains stable for months on end. I don't think I've encountered any stale WG sessions when connected to outside networks.

                                        chudakC 1 Reply Last reply Reply Quote 0
                                        • chudakC
                                          chudak @hvbakel
                                          last edited by

                                          @hvbakel said in Stale WG session ?:

                                          @eirikrcoquere After monitoring this for a few more days I think the stale connection in my case may be related to transitions between the home network that is behind the firewall and external mobile/wifi networks. The official WG client on my Android phone is configured with an always-on VPN connection to pfsense on the home network, using a dynamic DNS address that maps to the WAN IP.

                                          When I move from the home network to an external network there is typically no issue, but when connecting back to the home wifi the WG session often goes stale. Sometimes it's immediate, other times it is after some hours. Disabling/enabling the interface within the wireguard client fixes the issue so I'm not sure if it is an underlying issue with the way the home network is configured (pure NAT), or whether there is something in the handoff between networks that goes amiss under certain conditions. It does not seem related to e.g. changes in the IP address on the WAN interface because that typically remains stable for months on end. I don't think I've encountered any stale WG sessions when connected to outside networks.

                                          I will keep an eye on this use case. Off top of my head, I've seen it while being on my home network or T-Mobile cellular, but not 100% sure yet.

                                          Thx

                                          cmcdonaldC 1 Reply Last reply Reply Quote 0
                                          • cmcdonaldC
                                            cmcdonald Netgate Developer @chudak
                                            last edited by

                                            Obviously my lab is rebooted quite often as part of the normal daily development cycle. However, my kit has been up for 21 days without reboot thanks to some timing with some traveling and remote work over the past few weeks. All my tunnels to Mullvad, IVPN, etc have persisted this entire time. So, this might be a clue that there is something funky with the WireGuard Go implementation, which is what provides WG support for iOS and Android. I don't have the tooling currently setup to work on the iOS/Android ports, but I'm going to reach out to some people that do and see what they think. There was an issue that was identified by Kyle Evans a few months ago with the FreeBSD kernel implementation that could lead to a stale WG state...but right now it's really hard to tell where the problem lies.

                                            Need help fast? https://www.netgate.com/support

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