The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document describes the steps to setup and configure pfSense Community Edition as a Load Balancer for Enterprise Chat and Email (ECE).
Cisco recommends that you have knowledge of these topics:
The information in this document is based on these software versions:
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
pfSense Community Edition is a multi-function product that provides a Firewall, Load Balancer, Security Scanner, and many other services in a single server. pfSense is built on Free BSD and has minimal hardware requirements. The Load Balancer is an implementation of HAProxy and an easy to use GUI is provided to configure the product.
You can use this load balancer with both ECE and Contact Center Management Portal (CCMP). This document gives the steps to configure pfSense for ECE.
Use the pfSense website to download the iso installer image.
Configure a VM with the minimum requirements:
• 64-bit amd64 (x86-64) compatible CPU
• 1GB or more RAM
• 8 GB or larger disk drive (SSD, HDD, etc)
• One or more compatible network interface cards
• Bootable USB drive or high capacity optical drive (DVD or BD) for initial installation
For a lab install, only one network interface (NIC) is required. There are several ways of running the appliance, but the easiest is with a single NIC, also called one-arm mode. In one-arm mode, there is a single interface that communicates to the network. While this is an easy way and adequate for a lab, it is not the most secure way.
A more secure way of configuring the appliance is to have at least two NICs. One NIC is the WAN interface and communicates directly with the public internet. The second NIC is the LAN interface, and communicates with the internal corporate network. You can also add additional interfaces to communicate with various parts of the network that have different security and firewall rules. For example, you can have one NIC connect to the public internet, one connect to the DMZ network where all the externally accessible web servers are, and a third NIC connect to the corporate network. This allows you to have internal and external users securely access the same set of web servers that are kept in a DMZ. Ensure that understand the security implications of any design before implementation. Consult with a security engineer to ensure best practices are followed for your specific implementation.
Refer to this document for step-by-step instructions.
You must assign IP addresses to the appliance to continue configuration.
Note: This document shows an appliance configured in one-arm mode.
If you require VLAN support, answer y to the first question. Otherwise, answer n.
The WAN interface is the non-secure side of the appliance in two-arm mode and the only interface in one-arm mode. Enter the interface name when prompted.
The LAN interface is the secure side of the appliance in two-arm mode. If required, enter the interface name when prompted.
Configure any other interfaces you require for your specific install. These are optional and not common.
If your network supports DHCP, then the assigned IP address is shown in the console screen.
If there is no address assigned, or if you wish to assign a specific address perform these steps.
You then receive confirmation that the settings have been updated.
Note: You must use HTTP and not HTTPS initially.
Click next through the first two screens.
Provide the host name, domain name, and DNS server information.
Validate the IP Address information. If you initially chose DHCP, you can change this now.
Provide the NTP Time server hostname and select the correct Timezone in the drop-down.
Continue through the setup wizard until the end. The interface GUI restarts and you are redirected to the new URL once complete.
Note: Ensure that you select the Save button before you proceed. You are then redirected to the new https link.
If required, configure the proxy information on the Miscellaneous tab. To complete the setup and configuration, the appliance must have internet access.
Note: Ensure that you select the Save button after making changes.
Note: It can take a few minutes to load all of the packages that are available. If this times out, verify that the DNS servers are configured correctly. Often, a reboot of the appliance fixes the internet connectivity.
Note: Do not select the haproxy-devel package.
pfSense can create self-signed certificate or it can integrate with a public CA, an internal CA, or can act as a CA and issue CA-signed certificates. This guide shows the steps to integrate with an internal CA.
Before you begin this section, ensure that you have these items available.
Select the Add button.
As shown in the image:
1. Provide a unique, descriptive name
2. Select Import an existing Certificate Authority from the Method drop-down.
3. Ensure that the Trust Store and Randomize Serial check-boxes are selected.
4. Paste the entire certificate into the Certificate data text box. Ensure that you include from the -----BEGIN CERTIFICATE----- and -----END CERTIFICATE----- lines.
5. Select Save.
6. Verify that the Certificate is imported as shown in the image.
Repeat the steps to import the root CA certificate to import the intermediate CA certificate.
Review the Certificate Authorities to ensure that the Intermediate is correctly chained to the root certificate as shown in the image.
This describes the steps to create a CSR, export the CSR, then import the signed certificate. If you already have an existing certificate in a PFX format, you can import this certificate. Consult the pfSense documentation for these steps.
1. Select the Certificates menu, then select the Add/Sign button.
2. Complete the Certificate Signing Request form.
Note: The common name is automatically added to the SAN field. You only need to add additional names required.
Select Save once all fields are correct.
3. Export the CSR to a file.
Select the Export button to save the CSR, then sign this with your CA. Once you have the signed certificate, save this as a PEM or Base-64 file to complete the process.
4. Import the signed certificate.
Select the Pencil icon to import the signed certificate.
5. Paste the certificate data in the form.
Select Update to save the certificate.
6. Review the certificate data to ensure it is correct.
7. Repeat this process if you wish to host multiple sites on this pfSense.
At least one IP is required to host websites on the pfSense. In pfSense this is done with Virtual IPs (VIPs).
Use the information to add a VIP.
Select Save to commit the change.
Repeat this for each IP Address required for your configuration.
Select the, Apply Changes button after all VIPs have been added.
pfSense has a built-in firewall. The default rule-set is very limited. Before the appliance is put into production, ensure that you build a comprehensive firewall policy.
Note that one button adds the new rule above the selected line while the other adds the rule below the selected rule. Either button can be used for the first rule.
Use the information to create the rule.
Select Save.
Select the Add button to insert the rule below the newly created rule.
Select Save.
If required, drag the rules to sort them.
Select, Apply Changes once the firewall rules are in the order required for your environment.
HAProxy is implemented with a Frontend/Backend model.
The Frontend defines the side of the proxy that customers communicate with.
The Frontend consists of an IP and Port combination, certificate binding, and can implement some header manipulation.
The Backend defines the side of the proxy that communicates with the physical web servers.
The Backend defines the actual servers and ports, the loadbalancing method for initial assignment, health checks, and persistence.
A Frontend knows what backend to communicate with by either a dedicated backend or by using ACLs.
ACLs can create different rules so that a given frontend can communicate with different backends depending on various things.
Select the Enable HAProxy check-box.
Enter a value for Maximum Connections. See the chart in this section for details on the memory required.
Enter a value for the Internal stats port. This port is used to show HAProxy statistics on the appliance but is not exposed outside of the appliance.
Enter a value for the Internal stats refresh rate.
Review the remaining configuration and update as required for your environment.
Select Save.
Note: Configuration changes are not made active until you select the, Apply Changes button. You can make multiple configuration changes and apply them all at one time. Configuration does not need to be applied to be used in another section.
Start with the backend. The reason for this is that the frontend must reference a backend. Ensure that you have selected the Backend menu.
Select the Add Button.
Provide a name for the backend.
Select the down arrow to add the first server to the Server list
Provide a name to reference the server. This does not need to match the actual server name. This is the name that is shown on the stats page.
Provide the address for the server. This can be configured as either an IP Address for FQDN.
Provide the port to connect to. This must be port 443 for ECE.
Select the Encrypt(SSL) checkbox.
Provide a value in the Cookie field. This is the content of the session stickiness cookie and must be unique inside the backend.
After the first server has been configured, select the down arrow to configure any other web servers in the environment.
Configure the Loadbalancing options.
For ECE servers, this must be set to Least Connections.
Access control lists are not used in this configuration.
Timeout / retry settings can be left at their default configuration.
Configure the Heath checking section.
Ensure that you include a space after the final backslash but before the FQDN of the server.
Leave the Agent checks unselected.
Configure Cookie persistence:
The remaining sections of the backend configuration form can be left at their default settings.
If you wish to configure HSTS, configure a timeout value in this section. ECE inserts an HSTS cookie as well so this configuration is redundant.
Select, Save.
Change to the Frontend menu.
Select the, Add button
Provide a name for the Front end.
Provide a description to help identify the frontend later.
In the External address table:
Leave the Max connections empty.
Ensure the Type is selected as http / https(offloading).
The easiest configuration is to choose a Default Backend from the drop-down. This can be selected when the VIP hosts a single website.
As shown in the image, ACLs can be used to redirect a single frontend to multiple backends based on conditions.
You can see that the ACL checks to see if the host in the request starts with a name and port number. or simply the name. Based on this a specific backend is used.
This is not common with ECE.
In the SSL Offloading section, select the certificate created for use with this site. This certificate must be a server certificate.
Select the option, Add ACL for certificate Subject Alternative Names.
You can leave the remaining options at their default values.
Select, Save at the end of this form.
Select, Apply Changes to commit the Frontend and Backend changes to the running configuration.
Congratulations, you have completed the setup and configuration of pfSense.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
26-Feb-2024 |
Initial Release |