Configure Load Balancing on your Site using the the pfSense Firewall

Assumptions

This document assumes the following:

  • You have a need for load balancing TCP sessions over multiple servers.
  • You have a configured pfSense firewall up and running.
  • You are comfortable with the pfSense Firewall interface.

This document will configure load balancing for an example web site as shown in the diagram below:

image

Configure pfSense Firewall

First logon to your instance of the pfSense firewall.

clip_image002

 

Next select Services -> Load Balancer

clip_image004

You are then presented with the following page:

clip_image006

Select the “Monitors Tab”

clip_image008

Click on the “+” icon next to the “HTTP” rule, to duplicate the monitor:

clip_image010

Enter a new name and fill in the Host field if your web site utilises virtual hosts and click the “Save” button.

clip_image012

Click on the “Apply changes” button.

clip_image014

Next we need to create a new pool for the load balanced servers.  Click on the “+” icon.

clip_image016

Fill in the Name, Description, Port and Number of Retries.  Change the Monitor to TCP and add  the Server IP Addresses for the web servers, click the “Add to pool” button after you fill in each Server IP Address.  In our example the IP addresses are 192.168.10.2 and 192.168.10.3.

Make sure each IP address is listed as an Enabled Member.  Click on the “Save” button to save the configuration.

Click on the “Apply changes” button.

clip_image017

Next click on the “Virtual Servers” tab.

clip_image019

Click on the “+” icon to add a Virtual Server.

clip_image021

You should fill in the Name, Description, IP address (should be the IP address of the WAN interface), and the port field.  The remaining fields should be left as the defaults (assuming this is the first Load Balancing rule you have added).

clip_image023

Click the “Submit” button.

 

Click on the “Apply changes” button.

clip_image017

Finally we need to add a firewall rule to allow traffic to traverse the firewall.

Click “Firewall” – > “Rules”

clip_image025

Click the “+” icon at the bottom of the existing firewall rules.

clip_image027

Fill in the “Destination port range” as port 80.

clip_image029

Fill in a description, and click the “Save Button”.

clip_image031

 

The site should now be load balanced and traffic should flow through the firewall.

The file will then be downloaded.

By Jay Fearn Google

 

If your interested in using the Claranet VDC product please fill in your contact details below:

[recaptcha_form]

One thought on “Configure Load Balancing on your Site using the the pfSense Firewall

Leave a Reply