Beruflich Dokumente
Kultur Dokumente
Balancing in PFSense
http://www.tecmint.com/how-to-setup-failover-and-load-balancing-in-pfsense/
Failover is a type of backup operational mode in which the operations of a system
components such as network are assumed by secondary system, only when the
Primary system becomes unavailable due to system failure or any scheduled down
times.
In this setup, we will see how to setup Failover and Load balancing to enable
PFSense to load balance traffic from your LAN network to multiple WAN’s (here
we’ve used two WAN connections, WAN1 and WAN2).
For example, If in-case, one of your WAN connection went offline due to some
network connectivity issues, in this case your second WAN will be automatically
shifted from WAN1 to WAN2 by pinging one of your system IP, if there isn’t any
reply from system, it will automatically shift from WAN1 to WAN2 or vice-versa.
Load Balancer will combine our both WAN connections to become one powerful
internet connectivity. For example, if you’ve 2MB connection for WAN1 and 2MB
for WAN2, it will combine both into one with 4MB to stabilize the network
connection speed.
To setup Failover Load Balancer, we need at least three Ethernet cards with
minimum 100MB/1GB as follows. The first NIC is used for LAN with static IP
and other two with DHCP.
My Environment Setup
Before proceeding further, you must have a working PFSense installation, to know
more on how to install pfsense, go through the following article.
Configured Networks
https://192.168.1.1
4. After login into GUI, there you can see only WAN, LAN under the interface
widgets as shown below.
Configured Interfaces
After making above changes, it will ask you to apply changes in the top of page,
Click to confirm the changes.
Confirm WAN2 Changes
Now you will get three interfaces in ‘Interface‘ widget in the Dashboard.
Confirm Interfaces
So, here we’ve configured 2 WAN for our pfsense. Now let us see how to
configure our LoadBalancer for these configured WAN’s.
8. In the ‘Edit gateway‘ page, enter the IP address of monitor IP for both WAN1
and WAN2. In WAN1 I’m going to use my ISP DNS server IP 218.248.233.1. In
WAN2 going to use Google public DNS 8.8.8.8.
Configure Monitor IP
9. After adding Monitor IP, click on Advanced and give a low value for DOWN,
here I’m using 3 seconds to monitor the IP. Default will be 10 Seconds.
Monitor IP Failover
Use same settings for WAN2. Here I have used Google DNS instead of using my
ISP DNS. Click save to exit.
Configured System Gateways
13. At the bottom of the page, choose the created Gateway Group
“TecmintADSL” by clicking on Advancedunder Gateway option and click
on save to Apply changes to make the changes permanent.
Configure Firewall Gateway
After applying modifications, you can see the gateway and advanced icon
as show below.
15. To get the real time Graph we can use “Traffic Graph” under “Status”
menu.
Now, we will get three groups, first for LoadBalancing, second and third for
Failover.
1. Interface = LAN
2. Protocol = any
3. Source = LAN net
4. Description = What ever you wish for fail-over.
Configure FailOver Firewall Rule
19. After adding the above rules, you can see the below listed rules for both
LoadBalancer and Failover.
Conclusion
The above pfsense LoadBalancer and Failover setup can be used in home
or office environments only if you have Dual ISP connection’s. Instead of
paying for a branded dedicated Router with LB options we can use this
setup to build a LB with Failover.