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

Load balancing not working with Wireguard client

Scheduled Pinned Locked Moved Routing and Multi WAN
21 Posts 3 Posters 1.8k 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.
  • M
    madbrain @madbrain
    last edited by Apr 26, 2024, 1:13 PM

    @madbrain I had a config with load balancing working with 2 ISPs, which I restored.

    If I add an interface for the 3rd ISP, without doing anything else, the load balancing stops working.

    If I restore the same working config again, and rename the 2 WAN interfaces, the load balancing also stops working. I renamed WAN to Comcast and WAN2 to Sail. I wouldn't expect a cosmetic config change to affect functionality, but perhaps there are references by name somewhere else. I'm not sure what.

    G 1 Reply Last reply Apr 26, 2024, 2:13 PM Reply Quote 0
    • G
      Gblenn @madbrain
      last edited by Gblenn Apr 26, 2024, 2:14 PM Apr 26, 2024, 2:13 PM

      @madbrain Sounds really strange that a name change would have such an effect...

      And when adding the third interface, all you do is put that into the existing group, also set as Tier 1 like the others? And that breaks the load balancing completely?

      And what about policy rules? Do you have a rule both for the loadbalancer and the failover gateway as per that guide?
      If so, you need to make sure the balancer rule is above the failover, since rules are handled from the top.

      BTW, how do you go about changing the names of the gateways? Did you edit the config file or do you copy the gateway, give it a new name and then delete the old one?

      Changing name on a gateway can't be done without affecting other things, like the FW rules for example.

      M 1 Reply Last reply Apr 28, 2024, 10:11 AM Reply Quote 0
      • M
        madbrain @Gblenn
        last edited by Apr 28, 2024, 10:11 AM

        @Gblenn I agree it is strange. I can't reproduce the issue with the name anymore. But I can definitely reproduce the problem of load balancing not working.

        I backed up my settings, and started over with a brand new confign and configured all 3 ISPs.

        Still, all traffic is being directed at one ISP, even multiple hosts each initiating multiple connections .

        In the following graph I had 4 devices running Ookla Speedtest - a Windows box, a Linux box, a Raspberry Pi4, and my S22 Ultra phone on Wifi. All except the phone were wired.

        All traffic got routed to the Comcast WAN. Sail and Verizon WANs were untouched.
        What am I missing ?

        8d57504a-447e-4e44-8701-45eba79e3daa-image.png

        d54bd7da-eeab-4c9c-a797-fe1d8ab99e71-image.png

        99b5d24a-bae2-4797-9b25-8472a73007db-image.png

        316d4529-f515-4a06-8cf9-b96f54c3c239-image.png

        G 2 Replies Last reply Apr 28, 2024, 3:20 PM Reply Quote 0
        • G
          Gblenn @madbrain
          last edited by Apr 28, 2024, 3:20 PM

          @madbrain One thing that I notice which you have set different to what I have, is the default gateway IPv4. I have it set to the failover group that I created, in your case "v4LB". Whereas you have it as Automatic...

          M 1 Reply Last reply Apr 28, 2024, 10:28 PM Reply Quote 0
          • G
            Gblenn @madbrain
            last edited by Gblenn Apr 28, 2024, 5:01 PM Apr 28, 2024, 3:35 PM

            @madbrain When I looked at instructions you linked to, or e.g. Lawrence Systems, they suggest using the Gateway Group in the LAN rule. But instead I have it set as Default... and it's working fine.

            91c0aba6-46ac-4846-b8fd-8f4775d810e2-image.png

            M 1 Reply Last reply Apr 28, 2024, 10:29 PM Reply Quote 0
            • M
              madbrain @Gblenn
              last edited by Apr 28, 2024, 10:28 PM

              @Gblenn I tried setting the default gateway to the load balancer group also. That did not help, unfortunately. All traffic is still going through Comcast.

              1 Reply Last reply Reply Quote 0
              • M
                madbrain @Gblenn
                last edited by madbrain Apr 28, 2024, 10:39 PM Apr 28, 2024, 10:29 PM

                @Gblenn Are you using pfSense CE or Plus ? I'm using Plus. I don't see the same screen as you posted in your screenshot. Where is it at ?

                Edit: found under Firewall -> Rules -> LAN -> Edit (IPv4 rule) -> Show advanced -> Gateway . I set the load balancing group for both IPv4 and IPv6.

                And miraculously, the traffic started getting distributed across all 3 WANs !

                Thanks for the tip. I wonder how you got it to work without setting the gateway.

                92363ac5-24db-4ccb-a7dd-c0ab4d9eeb4a-image.png

                G 1 Reply Last reply Apr 29, 2024, 7:54 AM Reply Quote 0
                • G
                  Gblenn @madbrain
                  last edited by Apr 29, 2024, 7:54 AM

                  @madbrain I have always had it set to the gateway group in that setting. It was the firewall rule that is suggested both in the instructions you linked to and by Lawrence Systems. There I keep it at default..

                  Great that it works now!

                  G 1 Reply Last reply Apr 29, 2024, 11:36 AM Reply Quote 0
                  • G
                    Gblenn @Gblenn
                    last edited by Apr 29, 2024, 11:36 AM

                    I guess now you could take a look at the weighting, to rebalance based on individual capacity of each connection. Not the Tier number, but rather for each individual Gateway (under System / Routing / Gateways) when you expand the Advanced button. First item there is weight...

                    M 1 Reply Last reply May 4, 2024, 10:35 AM Reply Quote 1
                    • M
                      madbrain @Gblenn
                      last edited by May 4, 2024, 10:35 AM

                      @Gblenn Yes. I setup the weighting. Unfortunately, I ran into some issues with Netflix streaming, where buffering happened even though all 3 WANs were up. Will post a separate thread.

                      1 Reply Last reply Reply Quote 0
                      • R
                        rikazkhan
                        last edited by May 8, 2024, 11:20 AM

                        @madbrain said in Load balancing not working with Wireguard client:

                        I do have an extra NIC and a total of 3 ISPs rather than 2 ISPs before. But even disabling one interface for one of the ISPs does not restore the load balancing functionality.

                        I do have an extra NIC and a total of 3 ISPs rather than 2 ISPs before. But even disabling one interface for one of the ISPs does not restore the load balancing functionality.

                        M 1 Reply Last reply May 8, 2024, 8:59 PM Reply Quote 0
                        • M
                          madbrain @rikazkhan
                          last edited by May 8, 2024, 8:59 PM

                          @rikazkhan Your message was just a quote. Did you mean to add something ?

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