loadbalance router

atux john atux at null.net
Sun Aug 9 07:12:56 UTC 2015


Dear all
i would like your help in setting a second isp in my home router.
i have a small PC that runs ubuntu server 12.04 and it has 3 NICs.
eth0 is my LAN 192.168.0.1/24
eth1 is my WAN1 192.168.1.2/24 with gateway 192.168.1.1 (dsl router)
eth2 is my WAN2 192.168.2.2/24 with gateway 192.168.2.1 (dsl2 router2)

at the moment i am making use of eth0 to access the net with the following:
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
# iptables -A FORWARD -i eth0 -j ACCEPT
# iptables -A FORWARD -i eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
it works nice, but only one WAN.
how can i add the second wan to make use of it? in case there is a 
second session it will use the second wan. loadbalance per session. 
applications that create more sessions they will make use of both of the 
wans. also in case one wan fails it will be transparent to the user 
which wan has been used?
I have to mention that it needs to be in linux only and not other 
software (such as ipfire, pfsense, ...)
could someone help me please?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150809/5df7372a/attachment.html>


More information about the ubuntu-users mailing list