pfSense Load Balancing & Failover (easy mode)

Поділитися
Вставка
  • Опубліковано 10 лип 2024
  • Hi there guys, welcome to a pfSense tutorial where I will be discussing the difference between load balancing & failover. We will also be configuring both gateway types and just configure our dashboard in a nice way to see if our gateways are up and how traffic is routing with our traffic monitors. Hope you enjoy :D!
    ❗Help the channel grow by subscribing if you aren't subscribed already! A like is also very appreciated and feel free to leave a comment about what you liked or disliked in the video and what else you would like to see from me :) 👊❗
    Timestamps:
    📕00:00 - Introduction
    📕00:45 - Talking about LB & Failover
    📕02:15 - Configure secondary WAN
    📕03:25 - Configure LB with Gateway Groups
    📕07:27 - Configure dashboard for monitoring
    📕09:25 - WAN tests & Firewall rule update
    📕12:20 - Configure A&P Failover
    📕13:46 - Test Failover
    📕15:58 - Credits
    Support the Channel:
    ⭐Become a Patreon: / thenetworkberg
    ⭐Become a UA-cam Member: / @thenetworkberg
    Social Media:
    🌏 / thenetworkberg
    🌏 / bergnetwork
    🌏 / the-network-berg-39451...
    MTCRE Playlist:
    • Free MTCRE RoSv6
    MTCNA Playlist:
    • Free MTCNA RoSv6
    Thanks again for watching

КОМЕНТАРІ • 53

  • @EdFromOhio
    @EdFromOhio Рік тому +2

    Awesome explanation, and exactly what I needed to have fiber and an unlimited cell ISP backup for my home network.

  • @DrakeDealer
    @DrakeDealer Рік тому

    Thank you very much for making this, wonderful.

  • @techwildlife1
    @techwildlife1 Рік тому

    Thank you, nice job!

  • @user-bt2om7nf1x
    @user-bt2om7nf1x 5 місяців тому +1

    This is really an excellent tutorial, thanks you so much for vivid explanation.

  • @humwerthuz
    @humwerthuz 4 місяці тому

    Awesome tutorial, got two gigabit links at my house and so far i've been using them standalone with their own wifi networks... will try this once the new hardware arrives 🙌

  • @kittyman106gaming
    @kittyman106gaming Рік тому

    Sick tutorial

  • @johnknightiii1351
    @johnknightiii1351 2 роки тому +1

    Great video. I'm about to setup pfsense for my two fiber connections. This was very helpful. Now I need to figure out how to get xcp-ng with xen orchestra installed and pfsense on my n5105 router box that just came in

  • @Viking8888
    @Viking8888 2 роки тому +6

    I really appreciated your tutorial. It was the best one I've seen yet. I definitely wish that I had found yours before I did my setup! One thing that none of the tutorials explains, however, is what this setup actually does. I had thought, before getting mine setup and tested that is, that everything would be split between the connections, including downloads. Meaning, that part of a download, (A Linux ISO for example), would be downloaded through WAN1 and another part would come in through WAN2 to make the effective speed higher. My testing however has taught me that that is not how this works at all. If I start downloading that Linus ISO, it will download on say WAN1. If I start another download, it will come in through WAN2. It doesn't aggregate the speeds together, but it lessens the load on each connection when downloading from two or more sources at once. Hope this helps anyone that might be thinking the same I did and couldn't figure out why a test download was only using one connection.

  • @tom_hengst
    @tom_hengst 8 місяців тому +1

    Exactly what I was looking for. Thank you!

  • @ericapperley7411
    @ericapperley7411 Рік тому +5

    This is an excellent tutorial on the subject - each concept is well explained, and the presentation is not rushed. Congratulations on the result of your efforts!

    • @TheNetworkBerg
      @TheNetworkBerg  Рік тому

      Thank you very much for feedback Eric, I honestly appreciate it!

  • @SherawCairo
    @SherawCairo Рік тому

    Thanks 🙏

  • @chrisgardner4144
    @chrisgardner4144 Рік тому

    Thank you.

  • @earnwithatr-atrksaathpaise
    @earnwithatr-atrksaathpaise Рік тому

    Thanks Bro

  • @ryzenforce
    @ryzenforce Рік тому +5

    You should also mention about keeping ongoing sessions on the same gateway with the "sticky" option. That will prevent unwanted behaviors from some application that are receiving packets from a different gateways to crash or not work properly. That was apparent on your first bandwidth test that was load balancing a single stream on both of your gateways and you probably don't want that as application are not made to handle that properly.

    • @starryblue4
      @starryblue4 Рік тому

      Yes, i experience this when using loadbalancing in mikrotik and pfsense. like when you browsing bank websites, it will automatically log you out in the session because of different source ip.

    • @meisterchecho
      @meisterchecho Рік тому

      This should be applied when using VPN, since this needs an active connection..

    • @sebkeccu4546
      @sebkeccu4546 5 місяців тому

      Where is this stickiness option? I didn't see it in hes video

  • @ruilechomeur
    @ruilechomeur Рік тому +1

    Since Windows has no load balancer anymore, I just installed pfsense on hyperV with low vHardware, now I can load balanced

  • @wijayadika3192
    @wijayadika3192 Рік тому +1

    Can I do Load Balancing & Failover in the same time (double filter Rule load balancing & failover)?

  • @alimibrahem8120
    @alimibrahem8120 2 роки тому

    I will be very happy if you talking about hotspot in mikrotik. I see a lot of video a bout it but non of them was realy helpful.

  • @nageshachar155
    @nageshachar155 Рік тому +3

    i have done the same settings as you shown in this video but in failover when the WAN 1goes down it is switching to WAN 2 but when WAN1comes up it is not switching back to wan1 and also link status is showing unknown or sometimes pending

  • @fayazhamraz
    @fayazhamraz Рік тому

    Thank you for your nice procidure that you have prepared for Load Balancing it was awsome,
    I have a question how to setup two public IP addresses with same gateway on pfsense, each public IP address should give web and ssh access to each server, also each server should have communications Locally , your feedback is highly apperciated.

  • @raimundweiss
    @raimundweiss 8 місяців тому

    Great Tuorial, i have made the same Configuration. But if ich change the Gateway in Advanced in "Balanced", my internal Servers (Nextcloud, Bookstack) are unreachable (mapped per Port Forwarding long time ago). If i change it so default it works again. Someone know the Problem? Thanks.

  • @brandonbrand2338
    @brandonbrand2338 2 роки тому +1

    Nice video TNB. This is out to peeps that have been running PfSense for a long time. I have 2 different setups of PfSense where their failover connection is running from an LTE device. I have email alerts watching primary and secondary connections. What I find common with using LTE connections is that they drop out intermittently early hours of the morning. One can also say off peak hours. Would like to know if anyone else is experiencing this as well?

    • @BigBenAdv
      @BigBenAdv Рік тому

      Not just LTE connections actually. The fact of the matter is that most maintenance windows would be scheduled for off-hours and this applies to fixed lines as well.
      That said, there's also a chance that the LTE connection has a maximum lease time (maybe 24 hours?) so you see the link get re-established around the same time everyday.

  • @john09728
    @john09728 Рік тому +1

    can i do load balancing and failover active at the same time?

  • @3079shahid
    @3079shahid 2 роки тому

    Plz make a video on BGP configuration in pfsense thank so much

  • @muhamadkhalaf6556
    @muhamadkhalaf6556 10 місяців тому

    This is an excellent tutorial , but when some one on lan playing online it will be balanced or assigned to one of the 2 wan's

  • @gintarasp2
    @gintarasp2 2 роки тому

    How do you actually load balance incoming VPN connection? Is it possible to do failover of wan and be able to reach on prem services somehow?

  • @itsmehamza4682
    @itsmehamza4682 10 місяців тому

    i want to configure dual-wan without load-balancing and failover, can you help me ?

  • @parsecloudiz
    @parsecloudiz Рік тому

    hello , i have question , i want to set mikrotik as load balancer as port forwarding service , is it easy ? to load balance as port forwarding system to connect vpn servers .

  • @cyphersproject
    @cyphersproject 3 місяці тому

    Hi, I know this is an old video but maybe somebody will be able to help me out?
    I work at a small company (around 20 people) and for reliability sake we want to have a secondary WAN connection. We're still discussing wether to make it a load balancing configuration or a failover one. My main concern with load balancing is that we have a bunch of self-hosted services that rely on a dynamic DNS (desec), since we don't have a static IP, a custom script updates our DNS anytime the public IP changes. Would there be any way to make that setup work with a load balancer? since the traffic is constantly switching between gateways. To me, failover would be easier since the moment the new gateway kicks in the dns is updated and that's it... but would be kind of "wasteful" if it's not being used while both providers are up. Thanks in advance to anyone that may help me out!

  • @hamzababovic7322
    @hamzababovic7322 2 роки тому

    Can you make a video where you compare fortigate and pfsense, which is better

  • @saironergeable
    @saironergeable Рік тому

    Why can't we just change the default gateway instead after creating the group? is there a significant difference when changing it compare to going to Firewall Rules and changing every LAN rule's gateways? I hope someone could answer.

  • @kylelaker539
    @kylelaker539 10 місяців тому

    How about failing back? Let say my wan 1 is faster by 90 percent it goes down failover to wan 2 with just 10 percent of the speed, wan 1 goes up again will it failback?
    Edit:
    Failover and load balance works on untunneled network but not in wireguard. Is there a solution for that?

  • @TylerStraub
    @TylerStraub Рік тому +1

    Does anyone know the advantages or disadvantages in using LAGG in Failover mode versus using Gateway Groups and Load Balancing to achieve a similar result? I've been having a difficult time making a decision on which one to implement, and I think I'm just going to go with Load Balancing as demonstrated in this video because it seems to offer more specific control over when and how to trigger a failover event. Are there circumstances where LAGG Failover is preferable?

    • @BigBenAdv
      @BigBenAdv Рік тому +4

      These operate at different Layers. LAGG operates at Layer-1/2 whilst Gateway Load-balancing/ Failover operates at Layer-3. These are not mutually exclusive technologies either.
      So in essence, if you had a single WAN link with an ISP CPE (Modem/ ONT/ router etc), you could only do LAGG failover to cater for failure of ports/ interfaces/ cables.
      However, if you have 2 WAN links, then you do need to have gateway failover/ balancing groups because both WAN links are Layer-3 gateways.
      Each LAGG dependent interface has one IP and that IP is specific to that particular WAN link so you couldn't exactly just physically failover to the 2nd WAN link and expect it to work - it's technically possible with pure DHCP client interfaces and without PPP but you would only have one WAN link active at a given time.
      That said, you could 'bond' 2 physical links to each CPE from pfSense to enable the Layer-3 link to survive a cable/ port failure for each of the WAN links - this is where they are not mutually exclusive.
      As long as you have multiple layer-3 gateways, you should always use gateway groups. You don't necessarily have to have only one gateway group though.
      E.g.
      I have 2 x 1Gbps WAN from different ISP but have 2 different gateway groups using failover - one group favours WAN1 failover to WAN2, the other is in reverse.
      This allows me to use Group 1 for internal trusted devices networks, and Group 2 for untrusted networks (IOT/ Guest etc.). This lets me leverage on both links (get what you pay for) whilst providing service availability to all the networks.

    • @TylerStraub
      @TylerStraub Рік тому

      @@BigBenAdv thank you for the extremely thorough response, so much appreciated. Much respect!

  • @JoerBrando
    @JoerBrando Рік тому +1

    What happens when the primary line comes back online again? In my home setup, the failover doesnt make the primary WAN the defauly gateway again, even when the primary WAN is back online.
    Any way to tell pfSense to force the primary gateway back to the primary WAN once its back online again?

    • @bartoszchucherko9621
      @bartoszchucherko9621 Рік тому

      I am using a USB modem with t-mobile. Exactly same thing happens, when primary WAN comes back online, gateway does not switch back. Did you find a solution?Thank you.

    • @JoerBrando
      @JoerBrando Рік тому

      @@bartoszchucherko9621 I never did, i just turned on Round Robin instead, that way it will just try them all continuously, but is not a good solution for limited 4G connections etc

    • @bartoszchucherko9621
      @bartoszchucherko9621 Рік тому

      Thank you for reply.

    • @owobogbenga8185
      @owobogbenga8185 Рік тому

      Anyone with solution to this

  • @TheNetworkBerg
    @TheNetworkBerg  2 роки тому

    Just pinning this comment with some suggestions and reference material:
    Docs:
    docs.netgate.com/pfsense/en/latest/multiwan/load-balance-and-failover.html
    !!!NB!!!
    Similar to issues you may face when using ECMP/PCC on a MikroTik or other routers, many sites like banks that are security minded might freak out if you are sending multiple sessions from different source IPs. IE you log into your bank site on one session from one WAN IP, and then you are on the internet banking services on another session from a different WAN address. This sometimes tends to break the connection. It is recommended to create a rule for these security minded sites to rather connect using a Failover Group instead of a Load Balance group if you still want redundancy, alternatively you could just use the default connection to still get there. This way the sessions will be coming from a single source IP and should not cause issues. More details in the reference materials.

  • @Fawkes-ent
    @Fawkes-ent Рік тому

    What pfsense hardware are you using not sure what is best to get

    • @TheNetworkBerg
      @TheNetworkBerg  Рік тому +1

      I do not run any pfSense hardware, all instances I have used has been as Virtual machines. I would suggest reaching out to a distributor and telling them what your needs are and they can advise you what the correct specs should be. Though most small SOHO tend to use something like a Netgate 1100 or Netgate 2100

    • @Fawkes-ent
      @Fawkes-ent Рік тому

      @@TheNetworkBerg thanks for your reply I appreciate it

  • @netspotcyber2495
    @netspotcyber2495 2 роки тому

    Comparing to mikrotik which is more flexible

    • @TheNetworkBerg
      @TheNetworkBerg  2 роки тому +2

      Hmmmmm you know, both are REALLY flexible. There are additional packages that you can download for your pfSense to meet your requirements. Heck if you were a good coder you could probably create some packages yourself. On the other hand, Mikrotik has scripting functionality and if you know the language then you could probably also script whatever requirement you have. So if you were really a decent scripter you could probably do whatever the pfSense can, but then again those are not features that are native to ROS. So really a hard question to answer hehehe. I really like both though, but from a pure firewalling stance and ease of use initially I think I would pick the pfSense.

    • @Joshv918
      @Joshv918 2 роки тому

      I’ve been told that Mikrotik is just a better router. I know ISPs that pulled Cisco stuff just to use Mikrotik. For mainly natting .. I’ve been using pfsense for routing and mikrotik crs3xx series switches for the core. If I knew more about mikrotik I would use it more for routing .
      A great video would be a mikrotik router. Natting and pfsense behind doing the firewall work. Never quite understood how to make that happen