Howto Multi WAN-Load Balancing and failover with pfsense 2.0-BETA4
« on: September 07, 2010, 04:02:41 pm »
This guide was tested with pfSense-2.0-BETA4-20100905-1704.
1- Go to 'System->Routing' and create a new Group as shown in the
-- For load balancing, select more than one gateway on the same tier (e.g. tier 1)
-- For failover, select gateways on different tiers (e.g. wan on tier 1, when down will fail to wan2 on tier 2)
Here we created 3 groups:
- Wan1BalanceWan2, for load balancing WAN1 and WAN2
- Wan1FailoverWan2, failover WAN1 | WAN2
- Wan2FailoverWan1, failover WAN2 | WAN1
2- Go to 'System->Routing' and edit WAN and WAN2 gateways.
Fill Monit IP field with a reliable IP address beyond your WAN/WAN2 network that responds to ICMP pings.
The monitor IP address in the figure was taken from OpenDNS as example. Please, use your own IP addresses in your setup.
Here you can also customize advanced settings such as Weight (useful when balancing connections at different speed), Latency and Packet Loss thresholds, and Down time for the alarm to fire.
3- Go to 'Firewall->Rules' and set up rules to direct outbound traffic to your gateway groups, activating Load Balancing and Failover (see attached figures).
DNS and Load Balancing
- Go to 'System->General Setup' and be sure that you have at least one DNS server for each ISP. This ensures that you will have DNS service in case one WAN connection goes down. You may need to setup static routes for each DNS server unless your DNS servers are WAN/WAN2 IP addresses.
Finally, you can check your gateway groups at 'Status->Gateways' page.
Credits and references:
Thanks to jimp for your comments and suggestions!