Wading in IPTABLES, Traffic Shaping & Routing for Multiple Uplink Providers

By Angsuman Chakraborty, Gaea News Network
Friday, September 7, 2007

I am wading through tons of material to improve my knowledge of Linux networking in general and more specifically to configure our firewalls properly and routing for multiple uplink providers with traffic shaping and failover.

My earlier attempt to shortcut with eBox failed so this time I am going all the way. Expect more articles on these arcane topics in the coming days.

In the meantime if you can offer me a simple way to route multiple uplink providers with load balancing and transparent fail over that would be highly appreciated. Each of my DSL modems have been configured as a router & gateway with NAT enabled. So I don’t even have to mess with adsl commands. They are always up.

In the process I will also have to setup my internet machine as a gateway for the intranet. Previously I used firestarter. However that doesn’t work with multiple uplink providers.

I need to route certain traffic like sftp / scp through a particular (higher speed) interface. While browsing can use either. Downloading should use the higher speed interface. Traffic needs to be balanced 4:1 across the interfaces which is proportionate to their relative speed. In case you are wondering why I have the slower connection it is simply for redundancy.

Any suggestions and ideas welcome (which is why I have written this post).

PS. In case you are wondering about the complexity of the endeavor on Linux I don’t think you can even do them in Windows.

Update: Two followup articles detailing the solutions:
1. How To: Load balancing & failover with dual or multi WAN / DSL / ADSL / Cable connections on Linux
2. How to easily configure single / dual / multiple WAN / DSL / ADSL / Cable connection, Firewall, Gateway / NAT with Shorewall Firewall.

will not be displayed