# Load balancer for ipfire

**URL:** <https://community.ipfire.org/t/load-balancer-for-ipfire/9485>\
**Category:** Hardware\
**Created:** [19 March 2023 18:34 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485 "2023-03-19T18:34:07Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [19 March 2023 18:34 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/1 "2023-03-19T18:34:07Z")

</div>

@cfusco , I also have a question about “smart things”.  
First of all, I fully agree with what you have stated in the previous posts.  
Needing (out of passion) to create load balancing for myself (if one adsl or fiber line, goes down on me, another one set as failover is activated),  
I bought a TPLINK er605 router for about 100€, which I attached “cascaded” to IPFire’s RED, automatically creating double NAT, double firewall and double port forward.  
Honestly, this smart router is not giving me much satisfaction: once a month I have to reboot it, because it hiccups.  
How do you see this? I know that IPFire does not currently support load balancing which I am interested in.

Here is my router:

> **[Risultato della ricerca | TP-Link Italia](https://www.tp-link.com/it/search/?q=ER605&t=product&category=home)**

If this is not the right topic please move my question.

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [19 March 2023 19:16 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/2 "2023-03-19T19:16:48Z")

</div>

@casabenedetti I am not competent enough to give an informed opinion. However there are several people here that know network hardware well. I hope they will give you their point of view.

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [19 March 2023 19:18 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/3 "2023-03-19T19:18:42Z")

</div>

I thank you. However, I wonder if it is proper to continue my theme here. Please move the topic without hesitation if necessary.

---

<div class="post-metadata">

**Author:** ![jon](https://community.ipfire.org/user_avatar/community.ipfire.org/jon/32/15363_2.png) [@jon](https://community.ipfire.org/u/jon)\
**Post date:** [19 March 2023 19:59 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/4 "2023-03-19T19:59:34Z")

</div>

> [@casabenedetti](#):
>
> I bought a TPLINK er605 router for about 100€, which I attached “cascaded” to IPFire’s RED, automatically creating double NAT, double firewall and double port forward.  
> Honestly, this smart router is not giving me much satisfaction: once a month I have to reboot it, because it hiccups.

Does it have the latest and greatest firmware?

> **[ER605 | Omada Network Support](https://support.omadanetworks.com/us/product/er605/)**

It looks like it had an update last month…

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [19 March 2023 20:14 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/5 "2023-03-19T20:14:39Z")

</div>

I thank you very much for the shift. I was sure I posted in the wrong topic. I realized it later.

Yes, I have updated. My hardware version though is 1.  
So the latest firmware I see for my model is 2022-06-15

In fact, the hardware V2 even has a USB port. My hardware is the old model. I read that you damage the router by loading firmware from another hardware version. And that seems logical to me.

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [19 March 2023 20:17 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/6 "2023-03-19T20:17:36Z")

</div>

I am convinced, however, that big solutions are not there, other than buying either a better router or waiting for IPFire version 3. It seems to me that it will integrate such a system.

Also consider that I have been behind these upgrades. But after 30 days of continuous ER605 operation, failover no longer works if the main line goes down. Only solution: Reboot the ER605 once a month. For me it is a BUG that this firmware carries with it. Maybe for now I will use an electronic system that will reboot it for me. Or I will replace ER605 with unstable IPFire 3: a good reason to test it.

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [19 March 2023 22:45 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/7 "2023-03-19T22:45:02Z")

</div>

I connected it like this:  
 ![Schema](https://community.ipfire.org/uploads/default/original/2X/a/a2d6188e4463d86f27deda3a62532c7ced80a2e5.png)

---

<div class="post-metadata">

**Author:** ![sec-con](https://community.ipfire.org/user_avatar/community.ipfire.org/sec-con/32/16669_2.png) [@sec-con](https://community.ipfire.org/u/sec-con)\
**Post date:** [20 March 2023 07:16 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/8 "2023-03-20T07:16:54Z")

</div>

Yeah, keep that pesky Italian out of my threads… 🤪

Ave Carlo, I wish you decent coffee

But I wonder you do have TWO ISP connections and have so many IOT devices you need to load balance them? Is IPFire able to handle two ISP providers on RED at all?

---

<div class="post-metadata">

**Author:** ![tphz](https://community.ipfire.org/user_avatar/community.ipfire.org/tphz/32/16551_2.png) [@tphz](https://community.ipfire.org/u/tphz)\
**Post date:** [20 March 2023 07:49 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/9 "2023-03-20T07:49:39Z")

</div>

There are several threads on the forum about multiwan and wan failover.

Best

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [20 March 2023 09:30 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/10 "2023-03-20T09:30:47Z")

</div>

With multi-wan, IPFire cannot do load balancing by itself, but it can keep the line stable with a fail over automatic switch to the second provider if both lines are PPoE. I also believe that you can have two separate IPFire, one for each provider and using [keepalived](https://wiki.ipfire.org/addons/keepalived) implementation of the [**V** irtual **R** outer **R** edundancy **P** rotocol](https://www.rfc-editor.org/rfc/rfc5798) you can create only one gateway for your clients.

No idea about the details. My sources are the two documents I linked above.

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [20 March 2023 10:52 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/11 "2023-03-20T10:52:01Z")

</div>

Yes, let’s say it is not vital for me to use two ISP.  
Having surveillance cameras, it might come in handy to activate the second ISP (SIM modem) if the first ISP (landline) goes down.  
But the first ISP is stable. I could also eliminate it ER605.

The in any case, roughly it works. I can’t evaluate the gigabit surfing speed well. I have 90 mega downloads on the first ISP and 60 mega downloads on the second ISP. With these values no attenuation.  
There is only this “monthly restart” problem, which would not be serious.  
But eventually I will have to check the Tp-Link forums. It is not an IPFire problem. Of that I am certain.

The solution suggested by @cfusco  
I did not know. I will definitely take it into account.

---

<div class="post-metadata">

**Author:** ![cmspencer](https://community.ipfire.org/user_avatar/community.ipfire.org/cmspencer/32/16488_2.png) [@cmspencer](https://community.ipfire.org/u/cmspencer)\
**Post date:** [21 March 2024 17:31 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/12 "2024-03-21T17:31:57Z")

</div>

Hi,  
How do you have the ER605 configured.  
I’m trying to set up the same thing, but not having much success even getting the 2 WANs to be accessible from IPFire.  
Thanks

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [21 March 2024 18:17 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/13 "2024-03-21T18:17:57Z")

</div>

I sincerely thank you for asking the question.  
I am happy to help you, I will do my best.  
For the connections you can stick to my diagram.

The configuration is a bit more complex in the sense that IPFire “does not interact directly with ER605”.  
You see the multiwan router and IPFire as two blocks.  
To the ER605 router I have connected on its WAN ports 2 ISP modems, as the diagram shows.  
The ER605’s LAN port is to be connected to IPFIRE’s RED.

IPFire side: no particular configuration.

All the multiwan configurations, I did exclusively in the ER605.  
Keep in mind that the ER605 will see the IPFirewall as “one IP RED.” This means that you will not be able to make sure that you balance the load between two local computers in IPFire’s GREEN, nor between IPFire’s subnets.  
On the other hand, you will only be able to balance the load by “reasoning about ports,” or create a failover, or “add up” the UPLOAD and DOWNLOAD speeds, in the case of torrents.

I have given you a first smattering. Ask me more questions in more detail and I will try to help you further.  
Good work with the project.

P.S.  
This procedure I described is my current preferred condition.

---

<div class="post-metadata">

**Author:** ![trish](https://community.ipfire.org/user_avatar/community.ipfire.org/trish/32/16001_2.png) [@trish](https://community.ipfire.org/u/trish)\
**Post date:** [21 March 2024 20:59 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/14 "2024-03-21T20:59:10Z")

</div>

I don’t know much about TP-link routers or load balancing

but for plain old failover switching, [Cudy LT500D](https://www.amazon.com/Cudy-Unlocked-1200Mbps-Detachable-Interface/dp/B0B8M5F3VR/r)  
is fantastic, you can also use it to send SMS TXT messages and only costs 100

This one is 4G failover, 10/100mb ports

they also sell 5G with dual SIM , Gigabit ports …

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [21 March 2024 21:26 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/15 "2024-03-21T21:26:19Z")

</div>

Yes, there are many solutions on the market.  
The one I bought (old model) has up to 4 gigabit ISPs (WAN) and one gigabit LAN port. The WAN ports can also be configured as LAN ports. It seems to me that “at the time” it cost about 100€. All 4 WAN ports on the ER605 can be used as failover or load balance 😊 😉.

The new model now also has a USB port that should be used for a sim stick (I think).

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [21 March 2024 21:34 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/16 "2024-03-21T21:34:59Z")

</div>

I think if you only need a failover, the model you reported is fine. In the WAN I can connect an ISP router + the SIM, right? At least it is easier to configure I think.

---

<div class="post-metadata">

**Author:** ![trish](https://community.ipfire.org/user_avatar/community.ipfire.org/trish/32/16001_2.png) [@trish](https://community.ipfire.org/u/trish)\
**Post date:** [21 March 2024 21:53 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/17 "2024-03-21T21:53:27Z")

</div>

Yes in the WAN you would plug-in ISP Modem and you can use SIM for 4G LTE service

What ISP’s do you use for load balancing WAN?

I prefer ISP modem only, ISP routers will cause double NAT.

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [21 March 2024 22:00 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/18 "2024-03-21T22:00:44Z")

</div>

> [@trish](#):
>
> ISP routers will cause double NAT.

Yes, this is the serious problem 😉.

I have 100-megabit fiber (unfortunately, higher fiber is currently not available in my area).

As a second ISP I used an old modem with a sim.

And I made sure to hook up with “a third ISP” as well, taking advantage of my cell phone’s HotSpot “in combination with a WiFi repeater.”

IPFire 3 has “everything included.” So I was told in another post. And that solves the problems of double nat 🕶.

> [@Dual-WAN setting in IPFire (was: Two asymmetric uplinks)](https://community.ipfire.org/t/dual-wan-setting-in-ipfire-was-two-asymmetric-uplinks/10029/19):
>
> My understanding is that multi-wan is not possible on IPFire-2.x without significant reworking of the code. The devs will not look at doing that, as that would divert them from working on IPFire-3.x and supporting IPFire-2.x from security issues and bugs to existing capabilities. From my understanding IPFire-3.x should be able to do what you want as it is being designed to be able to have as many interfaces and zones as you want to have and to use them in whatever ways you want, such as vlans, …

---

<div class="post-metadata">

**Author:** ![casabenedetti](https://community.ipfire.org/user_avatar/community.ipfire.org/casabenedetti/32/16594_2.png) [@casabenedetti](https://community.ipfire.org/u/casabenedetti)\
**Post date:** [21 March 2024 23:22 UTC](https://community.ipfire.org/t/load-balancer-for-ipfire/9485/19 "2024-03-21T23:22:04Z")

</div>

In any case, I am not sure if it is always possible to eliminate a dual nat and use IPFire at the same time.  
In my network, my WIND fiber runs through its own specific modem/router. To this Wind Modem, a line for fixed telephone calls is also “hooked up”. I am not sure if IPFire 3 can replace my ISP modem. And that in itself generates a “dual NAT” (ISP Modem+IPFire). But if I eliminate ER605 by replacing it with IPFire 3, I will definitely have one less NAT.
