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

    WG 0.1.5 / pfS+ 21.05.1 - 2 WAN→1 WAN failover, not "failing back"

    Scheduled Pinned Locked Moved WireGuard
    16 Posts 3 Posters 3.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.
    • luckman212L
      luckman212 LAYER 8 @trumee
      last edited by

      @trumee Ok, I don't have any PPPoE systems to test with, so I'm guessing this is related to that.

      Immediately after a fresh boot, what is the output of wg showconf tun_wg0 (or whatever your wg tunnel interface is from the WG_IFNAME= line in the script)

      T 1 Reply Last reply Reply Quote 0
      • T
        trumee @luckman212
        last edited by

        @luckman212 said in WG 0.1.5 / pfS+ 21.05.1 - 2 WAN→1 WAN failover, not "failing back":

        wg showconf tun_wg0

        It is as follows,

        #root: wg showconf tun_wg0
        [Interface]
        ListenPort = 51820
        PrivateKey = mykeyredacted
        
        [Peer]
        PublicKey = mykeyredacted
        AllowedIPs = 0.0.0.0/0
        Endpoint = remotepublicip:51823
        PersistentKeepalive = 25
        
        luckman212L 1 Reply Last reply Reply Quote 0
        • luckman212L
          luckman212 LAYER 8 @trumee
          last edited by

          @trumee That looks fine. I read some of the older comments and I saw that you had to use devd to trigger on the WANUP event for PPPoE. Is that custom config still in effect?

          T 1 Reply Last reply Reply Quote 0
          • T
            trumee @luckman212
            last edited by

            @luckman212 Yes, the devd trigger is still in place. I am on pfsense+ (22.05) now.

            luckman212L 1 Reply Last reply Reply Quote 0
            • luckman212L
              luckman212 LAYER 8 @trumee
              last edited by

              @trumee I'm guessing that this is a timing issue; maybe the PPPoE connection comes up too quickly and the lockfile from the previous run is still in place, etc. Can you try this modified version (removes the mutex check) and see if it behaves differently?

              gist: wgfix.sh (no locks)

              T 1 Reply Last reply Reply Quote 0
              • T
                trumee @luckman212
                last edited by

                @luckman212 Unfortunately, i am seeing a bigger issue right now for this WAN. I will back to this once that is resolved.

                luckman212L 1 Reply Last reply Reply Quote 0
                • T trumee referenced this topic on
                • luckman212L
                  luckman212 LAYER 8 @trumee
                  last edited by

                  2.0: https://github.com/luckman212/wgfix

                  1 Reply Last reply Reply Quote 0
                  • D
                    ddbnj @luckman212
                    last edited by

                    @luckman212

                    Wireguard aside, does failback work for just the WANs at Site A? Once I failover to my LTE, and WAN comes back up, my states on the LTE interface remain.

                    luckman212L 1 Reply Last reply Reply Quote 0
                    • luckman212L
                      luckman212 LAYER 8 @ddbnj
                      last edited by

                      @ddbnj I created this to operate specifically on WireGuard states. If you need generic "fallback" state killing, you can try enabling the Reset all states if WAN IP Address changes option at the bottom of System → Advanced → Networking.

                      D 1 Reply Last reply Reply Quote 1
                      • D
                        ddbnj @luckman212
                        last edited by ddbnj

                        @luckman212

                        Thanks.

                        Evidently resetting all states works sporadically at best.

                        There is a long history of pfsense users asking for failback on interfaces. Scripts were written but no longer seem to be working.

                        https://forum.netgate.com/topic/135614/failback-from-primary-wan-after-failover-to-secondary-wan/19

                        I was hoping to repurpose your script.

                        luckman212L 1 Reply Last reply Reply Quote 0
                        • luckman212L
                          luckman212 LAYER 8 @ddbnj
                          last edited by

                          @ddbnj Feel free to fork and modify it- I had a "StateKiller" package that I was working on to do more complex rule-based state killing / failback but I sadly never finished it. Not sure how much interest there is for that now that they added some more general purpose state killing options in the recent builds.

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