Load Balancer Administration V 8
Load Balancer Administration V 8
Manual
Version 8.12.1 Revision 1.0.0
Table of Contents
Chapter 1 - Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
About the Appliance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Latest Version Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Appliance Configuration Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Appliance Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Security Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Passwords. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
The "root" Linux account. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
The "loadbalancer" WebUI account . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Ports Used by the Appliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Additional Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Deployment Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Quick Start & Configuration Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Contacting Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Chapter 2 - Load Balancing Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Load Balancing - the Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Supported Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Layer 4 & Layer 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
What are VIPs and RIPs? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
What is a Floating IP Address? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Load Balancing Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Round Robin / Weighted Round Robin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Least Connection / Weighted Least Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Destination Hashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Real Server Agent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Layer 4 vs Layer 7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Real Server Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Other Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Does Your Application Cluster Correctly Handle its own State? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Replication Solutions for Shared Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Solutions for Session Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
What if Your Application is not Stateless?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Default Persistence Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
What are Your Objectives? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Loadbalancer.org Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Chapter 3 - Topologies & Load Balancing Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
One-Arm and Two-Arm Topologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Supported Load Balancing Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Layer 4 DR Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Layer 4 NAT Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Layer 4 SNAT Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Layer 7 SNAT Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Which Load Balancing Method Should I Use? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Mode Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Our Recommendation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Chapter 4 - Appliance Fundamentals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Hardware Appliance Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Virtual Appliance Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Supported Hypervisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Host Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Virtual Hardware Resource Allocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Download & Extract the Appliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Hypervisor Deployment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
VMware Host Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
VMware vSphere Client. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
VMware Workstation Player. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
VMware Tools / Open VM Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Microsoft Hyper-V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Linux Integration Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
KVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Nutanix AHV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
XEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Cloud Appliance Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Configuring Initial Network Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Appliance Access & Configuration Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Accessing the Appliance WebUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Main Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
"Root" User Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Keyboard Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Chapter 5 - Appliance Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Installing the License Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Appliance Software Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Determining the Current Software Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Creating a Backup / Checkpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Online Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Auto-Check for Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Configuring Online Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Manual Check for Updates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Offline Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Updating a Clustered Pair. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Network Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Physical/Virtual Adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Configuring IP Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Configuring Bonding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Configuring VLANs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Interface Offloading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Configuring MTU Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Configuring Default Gateway & Static Routes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Management Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Policy Based Routing (PBR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Configuring Hostname & DNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Service Socket Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Appliance Security Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Security Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Users & Passwords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Linux root Account. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
WebUI User Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
External Authentication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Adding Additional Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Firewall Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Firewall Lock-down Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Conntrack Table Size. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Appliance Security Lockdown Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
SSH Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
System Date & Time Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Auto Configuration using NTP Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Manual Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Appliance Internet Access via Proxy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
SMTP Relay Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Syslog Server Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
SNMP Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Running OS Level Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Portal Management & Appliance Adoption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Restarting & Reloading Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Appliance Restart & Shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Restoring Manufacturer’s Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Using the WebUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Using the Console / SSH Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Chapter 6 - Configuring Load Balanced Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Layer 4 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
The Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Creating Layer 4 Virtual Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Configuring a New Layer 4 VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
Duplicating an Existing Layer 4 VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Modifying a Layer 4 VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Creating Layer 4 Real Servers (RIPs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
DR Mode Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
The ARP Problem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Detecting the ARP Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Solving the ARP Problem for Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
Solving the ARP Problem for Solaris . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Solving the ARP Problem for Mac OS X/BSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Solving the ARP Problem for Windows Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Solving the ARP Problem - Possible Side Effect for Windows 2012 & Later . . . . . . . . . . . . . . . . . . . . . . . 104
Other Windows Settings that May Cause Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Configuring Your Application to Respond to Both the RIP and VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Windows Firewall Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
NAT Mode Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
NAT Mode Potential Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
One-Arm (Single Subnet) NAT Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Firewall Marks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Firewall Marks - Auto Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Firewall Marks - Manual Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
Layer 4 - Advanced Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
Layer 7 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
The Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Creating Layer 7 Virtual Services (Using the Wizard) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
Creating Layer 7 Virtual Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Configuring a New Layer 7 VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Duplicating an Existing Layer 7 VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Modifying a Layer 7 VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
ACLs (Access Control Lists) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Modifying HTTP Header Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
HTTP Header Field Modification Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Creating Layer 7 Real Servers (RIPs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Layer 7 - Custom Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Configuring Manually Defined Virtual Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Transparency at Layer 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Enabling Transparency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Inserting Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Using TProxy to modify the Source IP Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Configuration Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Layer 7 - Advanced Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
HAProxy Status Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Floating IPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
SSL Termination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
SSL Termination on the Real Servers (SSL Passthrough) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
SSL Termination on the Load Balancer (SSL Offloading). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Using STunnel or Pound to Terminate SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Using HAProxy to Terminate SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Certificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Let’s Encrypt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Creating a SSL Termination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
Server Name Indication (SNI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
SSL Termination on the Load Balancer with Re-encryption (SSL Bridging) . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Using STunnel or Pound to Terminate SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Using HAProxy to Terminate SSL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Enabling SSL Re-Encryption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
SSL - Advanced Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
Pound Global Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
STunnel Global Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Mutual Transport Layer Security (mTLS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Configuring mTLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Upload the CA Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Front-end mTLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Back-end mTLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
Certificate Revocation List (CRL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
HTTP to HTTPS Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
When Terminating SSL on the Real Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
When Terminating SSL on the Load Balancer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Using STunnel or Pound. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Using HAProxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
Server Feedback Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Windows Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Installing the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Controlling the Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Linux/Unix Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
Installation & Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Configuring VIPs To Use The Agent or HTTP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
Global Server Load Balancing (GSLB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Key Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Key features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
GSLB Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
GSLB Service IP Address & Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
External Health Check Scripts (GSLB) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
GSLB Advanced Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
GSLB Multi-site Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Conceptual Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
Appliance Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
DNS Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
GSLB Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Configuring the Appliance via CLI, API & Direct Service Calls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Command Line Interface (CLI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
LBCLI Command Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
Running lbcli from a remote Linux Host . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Running lbcli from a remote Windows Host. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Application Programming Interface (API) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
Enabling the API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
API Endpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Creating the JSON Request . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
JSON Syntax Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Sending API Requests. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
Using ipvsadm to configure Layer 4 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
Using Linux socket commands to configure Layer 7 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Chapter 7 - Web Application Firewall (WAF) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Implementation Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Creating a New WAF Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Step 1 - Create the Layer 7 VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Step 2 - Define the Associated Real Servers (RIPs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Step 3 - Define the WAF Gateway . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Step 4 - Reload Services to Apply the New Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Step 5 - View Configured Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
Fail Open and Fail Closed Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
Configuring a WAF Gateway for Fail Open Operation (Default) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Configuring a WAF Gateway for Fail Closed Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
WAF Gateway Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Disable Web Application Firewall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
Ruleset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Paranoia Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Rule Engine Traffic Blocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Process Request Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
Process Response Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Inbound Anomaly Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Outbound Anomaly Score . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Audit Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
WAF Proxy Timeout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Enable Cache Acceleration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Double Login Enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
WAF - Advanced Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
PCRE Match Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
PCRE Match Limit Recursion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Working With the Core Rule Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
What is the Core Rule Set?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Core Rule Set Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Anomaly Scoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Overview of Anomaly Scoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
How Anomaly Scoring Mode Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Summary of Anomaly Scoring Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Anomaly Score Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
Severity Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Paranoia Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Introduction to Paranoia Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Description of the Four Paranoia Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
Choosing an Appropriate Paranoia Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
Setting the Paranoia Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
How Paranoia Levels Relate to Anomaly Scoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
False Positives and Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
What are False Positives? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Example False Positive. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Why are False Positives a Problem? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
Tuning Away False Positives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Directly Modifying CRS Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Rule Exclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Adding Custom WAF Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Per-Transaction Resource Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Default Limits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Handling Large HTTP Requests . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Large File Uploads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Requests Containing Large Amounts of Non-File Upload Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Requests with Massive Header Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
WAF Gateway Error Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Logging Mechanism Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Viewing the Error Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Default View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
Simple View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Breakdown View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Fixes View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Breakdown of a Log Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
Chapter 8 - Real Server Health Monitoring & Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Configuring Health Checks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Health Checks for Layer 4 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Health Checks for Layer 7 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
External Health Check Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Default Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Adding Additional Health Check Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Using Script Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Uploading External Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Testing External Health Check Scripts at the Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
Simulating Health Check Failures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Disabling Health Checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Fallback Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
Local Fallback Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Using a Separate Dedicated Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Using a Layer 7 VIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Configuring A Real Server as the Fallback Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Configuring Primary / Secondary Real Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Configuring Email Alerts for Virtual Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Layer 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
Global Layer 4 Email Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
VIP Level Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
Configuring a Smart Host (SMTP relay) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Layer 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Real Server Monitoring & Control using the System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Real Server Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Real Server Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Ordering of VIPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Sort by Column. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
Drag & Drop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Real Server Monitoring & Control using the HAProxy Statistics Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Real Server Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
Real Server Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
Chapter 9 - Appliance Clustering for HA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Clustered Pair Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Primary/Secondary Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Pair Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Heartbeat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Primary Secondary Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Settings that are NOT Replicated to the Secondary Appliance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Manually Forcing Appliance Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
To Create an HA Pair (Add a Secondary) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
To Break an HA Pair (Remove a Secondary) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316
Promoting a Secondary to Primary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
Configuring Heartbeat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
Communication Method. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
Peer Failure Detection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Routing Failure Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Email Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Fail-back Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320
Configuring a Smart Host (SMTP relay) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Connection State & Persistence Table Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Layer 4 VIPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
Layer 7 VIPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Clustered Pair Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Heartbeat State Diagnostics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Split Brain Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
Forcing Primary/Secondary Failover & Failback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
Testing & Verifying Primary/Secondary Replication & Failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
Heartbeat Log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
Late Heartbeats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
Chapter 10 - Configuration Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Initial Network Settings & WebUI Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Example 1 - One-Arm DR Mode (Single Appliance) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Configuration Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Verify Network Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Configure the Virtual Service (VIP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Configure the Real Servers (RIPs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
Configure the Real Backend Servers for DR Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Basic Testing & Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Example 2 - Two-Arm NAT Mode (Clustered Pair) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332
Configuration Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Configure the Primary’s Network Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
Configure the Secondary’s Network Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Configure the Virtual Service (VIP) using the Primary’s WebUI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
Configure the Real Servers (RIPs) using the Primary’s WebUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
Create the HA Clustered Pair using the Primary’s WebUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
Configure the Real Backend Servers for NAT Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Basic Testing & Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Example 3 - One-Arm SNAT Mode & SSL Termination (Single Appliance) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
Configuration Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Verify Network Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
Configure the Virtual Service (VIP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Configure the Real Servers (RIPs). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Configure SSL Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
Basic Testing & Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Example 4 - Load Balancing FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Layer 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
Layer 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Active Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Passive Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
Chapter 11 - Diagnostics & Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
The Appliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Resource Utilization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Administration Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Apache Logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Apache Access Log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Apache Error Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Layer 4 & Layer 7 Virtual Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
Checking Service State using the System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
VIP(s) Fail to appear in the System Overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
VIPs & RIPs are Green but Users Can’t Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
General. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Layer 7 VIPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Layer 4 VIPs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Diagnosing Real Server Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Requests are Not being Load Balanced as Expected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Log File - Layer 4 Virtual Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Interpreting the log file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Log File - layer 7 Virtual Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
Interpreting the log file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
SSL Termination (Pound) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
SSL Termination (STunnel) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
WAF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Heartbeat. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Shuttle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
Chapter 12 - Monitoring & Reporting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
SNMP Reporting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
MIB Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
SNMP for Layer 4 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 358
Monitoring Layer 4 VIPs & RIPs using SNMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
SNMP for Layer 7 Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
Monitoring Layer 7 VIPs & RIPs using SNMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
SNMPv3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Layer 4 Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
Layer 4 Traffic Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
Layer 4 traffic Counters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364
Layer 4 Current Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
Layer 4 Current Connections (Resolve Hostnames) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Layer 7 Status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
Layer 7 Stick Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
GSLB Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Resource Utilization Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Virtual Service & Real Server Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
Graphing Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
Layer 7 (HAProxy) Prometheus Exporter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
Grafana . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372
Chapter 13 - Useful Tools & Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Useful Diagnostics Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Netstat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Telnet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
Tcpdump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Ethtool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374
Nmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Iptraf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
Wireshark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Windows Specific Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Microsoft Network Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
WinSCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
PuTTy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
Chapter 14 - Backup & Restore and Disaster Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Backup & Restore. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Restore. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
Restore System Defaults . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
Checkpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 379
Template Deployment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
Disaster Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Being Prepared - Creating Backups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Firmware Recovery using a USB Memory Stick. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
Disaster Recovery After Node (Primary or Secondary) Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
Chapter 15 - Technical Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
WebUI Support Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Contact Us. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Technical Support Download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
Useful Links. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Remote Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Live Chat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
Appendix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Front & Rear Panel Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Enterprise Prime. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Enterprise Flex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Enterprise Max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
IPMI Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
IPMI Network Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
Using the Setup Utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
Using the IPMI Web Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Technical Support / More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
iDRAC Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
iDRAC Network Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Using System Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394
Using the iDRAC Web Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Technical Support / More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Appliance IPv4 Address Format (CIDR notation). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
Appliance Configuration Files & Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
Chapter 1 - Introduction
About this Manual
This document covers all required administration information for v8.12.x Loadbalancer.org appliances.
The appliance is available in the following formats: hardware, virtual (VMware, HyperV, KVM, Nutanix & XEN) and
cloud based (Amazon, Azure & GCP).
Loadbalancer.org always recommend that clustered pairs should be used where possible for
high availability and resilience, this avoids introducing a single point of failure to your network.
For more information on configuring an HA pair, please refer to Chapter 9 - Appliance Clustering
for HA.
Bug Fixes
LVS Agent for SNMP : Resolved issue which prevented the full LVS table from being accessed via SNMP.
MS SQL Health Check Template : The MS SQL check is now available in the health check scripts template
dropdown after running the install script.
Stick Tables in TSD : Corrected an issue where stick tables were omitted from Technical Support
Downloads.
RSyslog Configuration : Resolved issue which caused the contents of the “Remote syslog Server Template”
field to be written with improper escaping.
SAN Field in CSR Display : Fixed a display issue caused by particularly long SAN fields in the CSR output.
Balance Mode Persistence : Updated behavior to ensure that the first Balance Mode does not auto-select
persistence as "Stick" on Fallback.
System Overview Display : Resolved minor display issues affecting icons and labels in the System Overview.
PBR Local Routes Feature : Added the ability to select "local routes" for PBR in the WebUI.
Rsyslog Remote Protocol : Fixed an issue which caused the rsyslog remote protocol to be set improperly
sometimes.
Timezone Configuration : The selected timezone information is now available to processes other than the
WebUI at the OS level.
Static Routes Restoration : Resolved an issue where restoring did not properly restore static routes at the
OS level.
Gateway to Shuttle Certificate : Ensured proper passing of certificate data from gateway to the shuttle.
SSH Key Format : Corrected an issue where a single invalid SSH key would prevent peer communications
even if other valid SSH keys were present.
VMware Services Start-up : Addressed an issue where VMware services would attempt and fail to start on
physical appliances.
Health Check Scripts on Restore : Fixed an issue where health check scripts were not correctly written
during restore.
Crontab Entry for Updates : Corrected a malformed crontab entry which prevented the update check from
running.
Mod_Security Directory Ownership : Resolved wrong ownership issues for the mod_security directory.
Cookie Persistence Method : Addressed issues with the cookie persistence method.
HAProxy Configuration : Resolved an issue where using an * as a port range in a layer 7 virtual service
caused the reload SYN block to fail.
Layer 4 Health Checks : Corrected flip-flopping behavior observed with Layer 4 health checks when multiple
instances of the same real server are checked under certain configurations.
Upgrade System Issues : Addressed various issues related to the upgrade system.
Shuttle Service Update : Made it so that the Shuttle service is more robust when recovering from network
issues.
Fallback Server Label : Layer 7 fallback servers are now always named “backup” to maintain compatibility
with existing customer ACLs.
Proxy Settings on Upgrade : Resolved an issue where proxy settings were removed when installing a release
or restoring a configuration.
SSH Communication After Restore : Fixed a bug where SSH communication broke after restoring from a
checkpoint.
SSH Keys on Appliance Update : Ensured suitable SSH keys are present on appliances updated from older
versions.
Security Updates
By default, the WebUI is accessible on HTTPS port 9443, this can be changed if required. For more information,
please refer to the "Appliance Security" section below.
We always recommend that where possible two appliances are deployed as a clustered pair for high availability
and resilience, this avoids introducing a single point of failure to your network.
We recommend that the Primary appliance is fully configured first, then the Secondary appliance can be added to
create an HA pair. Once the HA pair is configured, load balanced services must be configured and modified on the
Primary appliance. The Secondary appliance will be automatically kept in sync. For more information on
configuring an HA pair, please refer to Chapter 9 - Appliance Clustering for HA.
For Enterprise Azure, the HA pair should be configured first. In Azure, when creating a VIP using
an HA pair, two private IPs must be specified – the first for the VIP when it’s active on the
Primary and the other for the VIP when it’s active on the Secondary. Configuring the HA pair first,
enables both IPs to be specified when the VIP is created.
Appliance Security
For full details of each security mode and all other security related features, please refer to
Appliance Security Features.
Security Mode
To control how the appliance is accessed and which features are enabled, 3 security modes are provided:
Custom - In this mode the security options can be configured to suit your requirements
Secure - (Default) - In this mode:
"root" user console access & SSH password access are disabled
WebUI connections are forced to use HTTPS
Access to the Local Configuration > Execute shell command menu option is disabled
The Firewall Script & the Firewall Lockdown Wizard Script cannot be edited
Secure - Permanent - This mode is the same as Secure but once set it cannot be changed
3. Click Update.
Passwords
The password for the "root" user Linux account and the "loadbalancer" WebUI user account are set during the
Network Setup Wizard.
The passwords for the cloud products are either set to a default value or are configured during
instance deployment. Also, for Enterprise AWS and Enterprise Azure it’s not possible to directly
log in as "root". For more details, please refer to the relevant Quick Start Configuration Guide.
# passwd
TCP 22 * SSH
The ports used for SSH, GSLB, SNMP, the WebUI, the fallback page, the gateway service and the
Additional Information
Deployment Guides
Comprehensive deployment guides are available that focus on load balancing specific applications. They cover
the configuration of the load balancer and also any application specific configuration changes that are required to
enable load balancing. All guides are available on our website at the following URL:
https://www.loadbalancer.org/support/deployment-guides/.
Quick Start Guide - Hardware & Virtual
Quick Start Configuration Guide - Amazon AWS
Quick Start Configuration Guide - Microsoft Azure
Quick Start Configuration Guide - Google Cloud Platform
Contacting Support
If you have any questions regarding the appliance or need assistance with load balancing your application, please
don’t hesitate to contact support@loadbalancer.org.
Supported Protocols
Loadbalancer.org appliances are able to load balancer virtually any TCP or UDP based protocol including HTTP,
HTTPS, FTP, SMTP, RDP, SIP, IMAP, POP, DNS etc. etc.
It’s not possible to configure a VIP on the same IP address as any of the network interfaces.
This ensures that services are able to "float" (move) between Primary and Secondary appliances
when using an HA clustered pair.
Destination Hashing
With the method, requests are distributed to Real Servers by looking up the destination IP in a static hash table.
This algorithm is designed for use with web proxies and is supported with layer 4 DR mode Virtual Services only.
For more information on this method, please refer to Modifying a Layer 4 VIP.
Layer 4 vs Layer 7
A fundamental choice when setting up the load balancer is whether to configure the services at layer 4 or layer 7.
The Basics
At layer 4 the primary protocols used are TCP and UDP. These protocols are not aware of upper level protocols
such as FTP, HTTP, HTTPS, DNS, RDP etc. Therefore the load balancer can only make load balancing decisions
based on details available at layers 4 and below such as port numbers and IP addresses. At layer 7, the load
balancer has more information to make load balancing related decisions since more information about upper
level protocols is available.
Layer 7 load balancing uses a proxy at the application layer (HAProxy). Requests are terminated on the load
balancer, and the proxy generates a new request which is passed to the chosen Real Server.
Performance
Due to the increased amount of information at layer 7 and the fact that a proxy is in use, performance is not as
fast as at layer 4. If raw throughput is a primary concern, then layer 4 is probably the better choice.
Persistence
Persistence (aka affinity or sticky connections) is the ability to ensure that a specific client connects back to the
same server within a specific time limit. It is normally required when the session state is stored locally on the Real
Transparency
Transparency refers to the ability to see the originating IP address of the client. For layer 4 DR mode and NAT
mode, connections are transparent. For layer 4 SNAT mode and layer 7 SNAT mode, the IP address of the load
balancer is recorded as the source address (for Layer 7 SNAT mode, this can also be set to a user configured
address). For layer 7 SNAT mode, additional configuration steps can be taken to force the client IP to be logged.
Options include using TProxy to re-write the source address or by enabling support for X-Forwarded-For or Proxy
Protocol headers. For more information, please refer to Transparency at Layer 7.
Other Considerations
Does Your Application Cluster Correctly Handle its own State?
Load balancers work most effectively if the application servers are completely stateless. This means that if an
application server (i.e. Real Server) fails and is automatically taken out of the cluster, then all current user
sessions will be transferred to other servers in the cluster without users needing to re-authenticate to the
application.
Web based applications are inherently stateless and are an ideal candidate for load balancing. However, do your
web servers store files and other information on local drives?
Images (jpeg, png, gif etc.)
Files (html, php, asp etc.)
If so, these files need to be on shared storage or they need to be replicated to all nodes in the cluster.
This problem can be resolved by implementing a shared persistent data store for the cluster. This is usually
SSH
FTP
SMTP
You may also find that you are unable to modify your HTTP/HTTPS based application to handle shared session
data.
For these cases you can use persistence. You lose the ability to have transparent fail-over, but you benefit from
increased capacity and manageability.
Source IP Address
HTTP Cookie (the default for new Virtual Services)
Application Cookie
SSL Session ID
MS Session Broker
RDP Client Cookie
HTTP Cookie with Fallback to Source IP
X-Forwarded-For with Fallback to Source IP
Stick On Fallback
Last Successful
SSL session ID based persistence is useful in certain circumstances, although due to the way
some browsers operate - notably older versions of Internet Explorer, the session ID can be
renegotiated frequently (every few seconds) which breaks the persistence.
For details of all standard layer 7 persistence options, please refer to Modifying a Layer 7 VIP.
It’s also possible to configure other custom persistence types if required using the custom
configuration option available for layer 7 Virtual Services. For more information, please refer to
Layer 7 - Custom Configurations.
Performance A load balancer can increase performance by allowing you to utilize several commodity
servers to handle the workload of one application.
Availability Running an application on one server gives you a single point of failure. Utilizing a load
balancer to present multiple servers improves application availability but moves the point
of failure to the load balancer. We always advise that you deploy load balancers as
clustered pairs to remove this single point of failure. For more information, please refer to
Chapter 9 - Appliance Clustering for HA).
Maintenance Using the appliance, you can easily bring servers on and off line to perform maintenance
tasks, without disrupting users.
In order to achieve all three objectives, your application must handle persistence correctly. For
more information, please refer to Does Your Application Cluster Correctly Handle its own State?.
Loadbalancer.org Terminology
Load Balancer An IP based traffic manager for server clusters.
Virtual Service The main building block used to configure load balanced services. It defines the IP
address clients connect to, which Real Servers are load balanced and other settings such
as health check options, persistence options and timeout settings.
Real Server The actual backend server being load balanced. Multiple Real Servers are associated with
a Virtual Service.
VIP Virtual IP address - the IP address of the load balanced cluster of RIPs, the address
presented to connecting clients. Also refers to the logical load balancer configuration and
is used as an acronym for Virtual Service.
RIP The Real IP address - the IP address of a backend server in the cluster. Also refers to the
logical load balancer configuration and is used as an acronym for Real Server.
Floating IP The Floating IP Address is automatically created whenever a Virtual Service is configured,
the floating IP address is the same as the VIP address. It enables services to be moved
between the Primary and Secondary appliance.
WebUI / WUI Web User Interface. Used to configure and manage the appliance.
Layer 4 Part of the seven layer OSI model. Also a descriptive term for load balancing methods
that routes packets based on TCP/IP header information.
Layer 7 Part of the seven layer OSI model. Also a descriptive term for a proxy based load
balancing method that distributes packets based on the entire TCP/IP header and also
the payload information at the application layer.
NAT Mode Network Address Translation is a standard layer 4 load balancing technique that changes
the destination of packets to and from the VIP (external subnet to internal cluster subnet).
Layer 4 SNAT Mode Source Network Address Translation - similar to NAT mode but also modifies the source
address of all outgoing traffic to be the load balancer.
Layer 7 SNAT Mode Source Network Address Translation - the load balancer acts as a proxy for all incoming &
outgoing traffic.
SSL Termination The SSL certificate is installed on the load balancer in order to decrypt HTTPS traffic on
behalf of the cluster.
MASQUERADE Descriptive term for standard firewall technique where internal servers are represented as
an external public IP address. Sometimes referred to as a combination of SNAT & DNAT
rules.
One-Arm The load balancer has one physical network card connected to one subnet.
Two-Arm The load balancer has two interfaces connected to two subnets - this can be achieved by
using two network adapters, or by creating VLANs on a single adapter.
Eth0 The first Ethernet interface. Also known as Gb0 on the Enterprise Flex and Max. Usually
used as the internal interface in a two-arm deployment, although this is optional.
Eth0 The second Ethernet interface. Also known as Gb1 on the Enterprise Flex and Max.
Usually used as the external interface in a two-arm deployment, although this is optional.
Eth4 The Fifth Ethernet interface (Enterprise Max only, also depends on choice of adapter
cards).
Eth5 The Sixth Ethernet interface (Enterprise Max only, also depends on choice of adapter
cards).
One-Arm
The VIP and the load balanced servers are located in a single subnet. The load balancer requires a single network
interface adapter - eth0 in the diagram below.
Two-Arm
Here, 2 subnets are used. The VIP is located in one subnet and the load balanced Real Servers are located in the
other. The load balancer requires 2 interfaces, one in each subnet as shown in the diagram below.
This can be achieved by using two network adapters, or by creating VLANs on a single adapter.
Typically eth0 is used as the internal interface and eth1 is used as the external interface. This is
not a requirement - each interface can be used for any purpose.
Very simple to implement
Requires no Real Server configuration changes
Layer 7 SNAT Mode Allows greater flexibility including full SNAT and One-Arm or 4
(Source Network remote server load balancing, also supports Two-Arm
Address Translation advanced functionality such as multiple persistence
using HAProxy) methods, header manipulation and URL rewriting
Very simple to implement
Requires no Real Server configuration changes
Not as fast as Layer 4 methods
Layer 7 SSL Termination Typically required to allow cookie persistence, header One-Arm or 5
(STunnel, Pound & manipulation and URL rewriting in HTTPS streams Two-Arm
HAProxy)
SSL termination is processor intensive
(*) DR mode can also be used in a multi-homed configuration where Real Servers are located in different subnets.
In this case, the load balancer must have an interface in the same subnet to enable layer 2 connectivity which is
required for DR mode to operate.
Notes
2. Only required for DR mode implementations across routed networks (rarely used).
3. Useful when you want to load balance both TCP and UDP but you’re unable to use DR mode or NAT mode
due to network topology or Real Server related reasons.
4. Used for multiple Microsoft applications such as Exchange, SharePoint, ADFS and RDS.
Layer 4 DR Mode
Layer 4 DR (Direct Routing) mode is a very high performance solution that requires little change to your existing
infrastructure. The image below shows an example network diagram for this mode.
Kemp, Brocade, Barracuda & A10 Networks call this Direct Server Return and F5 call it nPath.
DR mode works by changing the destination MAC address of the incoming packet to match the selected
Real Server on the fly which is very fast.
When the packet reaches the Real Server it expects the Real Server to own the Virtual Services IP address
(VIP). This means that each Real Server (and the load balanced application) must respond to both the Real
Server’s own IP address and the VIP.
The Real Server should not respond to ARP requests for the VIP. Only the load balancer should do this.
Configuring the Real Server in this way is referred to as "Solving the ARP Problem". For more information
please refer to DR Mode Considerations.
On average, DR mode is 8 times quicker than NAT mode for HTTP and much faster for other applications
such as Remote Desktop Services, streaming media and FTP.
The load balancer must have an interface in the same subnet as the Real Servers to ensure layer 2
connectivity which is required for DR mode to operate.
The VIP can be brought up on the same subnet as the Real Servers or on a different subnet provided that the
load balancer has an interface in that subnet.
Port translation is not possible with DR mode, e.g. VIP:80 → RIP:8080 is not supported.
DR mode is transparent, i.e. the Real Server will see the source IP address of the client.
The load balancer translates all requests from the Virtual Service to the Real Servers.
NAT mode can be deployed in the following ways:
Two-arm (using 2 Interfaces) (as shown above) - Here, 2 subnets are used. The VIP is located in one
subnet and the load balanced Real Servers are located in the other. The load balancer requires 2
interfaces, one in each subnet.
Normally eth0 is used for the internal network and eth1 is used for the external network although
this is optional. Any interface can be used for any purpose.
If the Real Servers require Internet access, Auto-NAT should be enabled using the WebUI menu
option: Cluster Configuration > Layer 4 - Advanced Configuration, the external interface should be
selected.
The default gateway on the Real Servers must be set to be an IP address on the load balancer.
For an HA clustered pair, a floating IP should be added to the load balancer and
used as the Real Server’s default gateway. This ensures that the IP address can
"float" (move) between Primary and Secondary appliances.
One-arm (using 1 Interface) - Here, the VIP is brought up in the same subnet as the Real Servers.
To support remote clients, the default gateway on the Real Servers must be an IP address on the
load balancer and routing on the load balancer must be configured so that return traffic is routed
back via the router.
For an HA clustered pair, a floating IP should be added to the load balancer and
used as the Real Server’s default gateway. This ensures that the IP address can
"float" (move) between Primary and Secondary appliances.
To support local clients, return traffic would normally be sent directly to the client bypassing the
load balancer which would break NAT mode. To address this, the routing table on the Real Servers
must be modified to force return traffic to go via the load balancer. For more information please
refer to One-Arm (Single Subnet) NAT Mode.
If you want Real Servers to be accessible on their own IP address for non-load balanced services, e.g. RDP,
you will need to setup individual SNAT and DNAT firewall script rules for each Real Server or add additional
VIPs for this.
Port translation is possible with Layer 4 NAT mode, e.g. VIP:80 → RIP:8080 is supported.
NAT mode is transparent, i.e. the Real Server will see the source IP address of the client.
In NAT mode, the inbound destination IP address is changed by the load balancer from the Virtual Service IP
address (VIP) to the Real Server. For outbound replies the load balancer changes the source IP address of the
Real Server to be the Virtual Services IP address.
In this simple example all traffic destined for IP address 10.0.0.20 on port 80 is load-balanced to the real IP
address 192.168.1.50 on port 80.
1) The incoming packet for the web server has source and destination addresses as:
4) The packet is written back to the VIP address and returned to the client as:
The load balancer translates all requests from the external Virtual Service to the internal Real Servers in the
same way as NAT mode - please refer to Layer 4 NAT Mode for more information.
Layer 4 SNAT mode is not transparent, an iptables SNAT rule translates the source IP address to be the load
balancer rather than the original client IP address.
If the Real Servers require Internet access, Auto-NAT should be enabled using the WebUI option: Cluster
Configuration > Layer 4 - Advanced Configuration, the external interface should be selected.
Requires no mode-specific configuration changes to the load balanced Real Servers.
Port translation is possible with Layer 4 SNAT mode, e.g. VIP:80 → RIP:8080 is supported.
You should not use the same RIP:PORT combination for layer 4 SNAT mode VIPs and layer 7 SNAT mode
VIPs because the required firewall rules conflict.
Because layer 7 SNAT mode is a full proxy, any server in the cluster can be on any accessible subnet
including across the Internet or WAN.
Layer 7 SNAT mode is not transparent by default, i.e. the Real Servers will not see the source IP address of
the client, they will see the load balancer’s own IP address by default, or any other local appliance IP address
if preferred (e.g. the VIP address). This can be configured per layer 7 VIP. If required, the load balancer can
be configured to provide the actual client IP address to the Real Servers in 2 ways. Either by inserting a
header that contains the client’s source IP address, or by modifying the Source Address field of the IP
packets and replacing the IP address of the load balancer with the IP address of the client. For more
information on these methods please refer to Transparency at Layer 7.
Requires no mode-specific configuration changes to the load balanced Real Servers.
Port translation is possible with Layer 7 SNAT mode, e.g. VIP:80 → RIP:8080 is supported.
You should not use the same RIP:PORT combination for layer 7 SNAT mode VIPs and layer 4 SNAT mode
VIPs because the required firewall rules conflict.
For detailed configuration examples using various modes, please refer to Chapter 10 -
Configuration Examples.
Layer 4 NAT Mode - This mode is also a high performance solution but not as fast as DR mode. It requires the
default gateway of each Real Server to be the load balancer and supports both one-arm and two-arm
configurations. Layer 4 NAT mode is transparent, i.e. the Real Servers will see the source IP address of the client.
Layer 4 SNAT Mode - This mode is also a high performance solution but not as fast as the other layer 4 modes. It
does not require any changes to the Real Servers and can be deployed in one-arm or two-arm mode. This mode is
ideal for example when you want to load balance both TCP and UDP but you’re unable to use DR mode or NAT
mode due to network topology or Real Server related reasons. Layer 4 SNAT mode is non-transparent, i.e. the
Real Servers will see the source IP address of the load balancer.
Layer 7 SNAT Mode - This mode offers greater flexibility but at lower performance levels. It supports HTTP
cookie insertion, RDP cookies, Connection Broker integration and directly supports SSL termination or can
forward traffic to STunnel or Pound if preferred. It also enables URL rewriting and header manipulation rules to be
implemented. It does not require any changes to the Real Servers and can be deployed in either one-arm or two-
arm mode. HAProxy is a high performance solution, but since it operates as a full proxy at layer 7 it cannot
perform as fast as the layer 4 methods. Layer 7 SNAT mode is non-transparent by default, i.e. the Real Servers
will see the source IP address of the load balancer rather than the client. This mode can be made transparent
through the use of TProxy.
Our Recommendation
Where possible we recommend that Layer 4 Direct Routing (DR) mode is used. This mode offers the best
possible performance since replies go directly from the Real Servers to the client, not via the load balancer. It’s
also relatively simple to implement. Ultimately, the final choice does depend on your specific requirements and
infrastructure.
If you are using Microsoft Windows Real Servers, we recommend that NLB (Network Load
3. Connect a network cable from your switch to one of the Ethernet ports, typically eth0 but this is not
mandatory as each interface can be used for any purpose. If using a two-armed configuration connect
another cable to a second Ethernet port, typically eth1 but again this is not mandatory.
4. For a clustered hardware pair, the appliances must be able to communicate either via the network (ucast),
via serial cable or both. By default, ucast only is used. If serial is preferred or you want to use both methods,
connect a serial cable between the two appliances.
If a serial cable is used, Heartbeat must be configured for this using the WebUI option:
Cluster Configuration > Heartbeat Configuration and enabling 'Serial'.
6. Check mains power is on and press the power switch. The fans should start & front panel LEDs should light.
The above image shows the Enterprise Prime. For network interface information for other
models please refer to Front & Rear Panel Layouts.
7. Now follow the on-screen instructions to configure the management IP address and other network settings
as detailed in Configuring Initial Network Settings.
Virtual Box : v6.0 & later
Microsoft Hyper-V : v2012 & later
KVM : Kernel version v2.6.20 & later
XEN : v6.0 & later
Nutanix AHV
Host Requirements
To run the Loadbalancer.org Enterprise VA (irrespective of which Hypervisor is being used) the following basic
server specifications must be met:
64bit CPU
Virtual Technology hardware support - either Intel-VT-x or AMD-V compliant CPUs
2 vCPUs
4GB RAM
20GB disk
The CPU and memory allocations are suitable for a PoC or for low to medium throughput production applications.
For more demanding situations, they can be increased as needed. Resources required depend on multiple factors
including the application being load balanced, the number of end-users, the anticipated throughput, the underlying
physical hardware running the hypervisor and whether you’ll be load balancing at layer 4 or layer 7. Therefore it’s
not realistic to make generic recommendations. If you need assistance in determining the resources required for
your deployment, please contact support.
2. Enter your details (all fields except email address are optional).
All information provided is 100% confidential. If you’re conducting a PoC (Proof of Concept) trial
we may follow up with an email or phone call to see how you’re getting on and offer assistance,
but under no circumstances will Loadbalancer.org share your details with a third party.
The same download is used for the licensed product, the only difference is that a license key file
The VA has 4 network adapters. For VMware, only the first adapter (eth0) is connected by
default. For HyperV, KVM, XEN and Nutanix AHV all adapters are disconnected by default. Use
the network configuration screen within the Hypervisor to connect the required adapters.
Hypervisor Deployment
VMware Host Client
1. Right-click Host in the VMware Host Client inventory and select Create/Register VM.
2. On the Select creation type page of the wizard, select Deploy a virtual machine from an OVF or OVA file
and click Next.
3. On the Select OVF and VMDK files page, provide a unique name for the virtual machine.
4. Click the blue pane to open your local system storage, browse to the VA download location and select both
the .ovf and .vmdk files.
5. Complete the remaining options according to your requirements and deploy the VA.
2. In the Select an OVF Template screen, select the Local File option, click Browse, navigate to the download
location, select both the .ovf and .vmdk files and click Next.
3. In the Select a name and folder screen, type a suitable name for the appliance - this can be up to 80
characters in length.
4. Select the required location for the appliance - by default this will be the location of the inventory object from
where the wizard was started and click Next.
5. In the Select a compute resource screen, select the required compute resource for the appliance - by default
this will be the inventory object from where the wizard was started and click Next.
6. In the Review details screen, verify the template details and click Next.
7. In the Configuration screen, select the required CPU/RAM deployment configuration and click Next.
10. In the Select Networks screen, select the required destination network using the drop-down next to VM
Network and click Next.
11. In the Ready to complete screen, review the settings and click Finish to create the virtual appliance. To
change a setting, use the Back button to navigate back through the screens as required.
2. Using the drop-down next to the relevant network adapter(s), select the required Network and tick (check)
the Connected check-box and click OK.
When updating a v8.7.x appliance to v8.8.1 using online or offline update, VMware tools is removed and Open VM
Tools is installed.
When using open-vm-tools, the VMware Tools status is shown as "Guest Managed" on the
virtual machine Summary tab. The status Guest Managed means that you cannot use the
vCenter Server to manage VMware Tools and you cannot use vSphere Update Manager to
Microsoft Hyper-V
The steps below apply to Windows Hyper-V 2012 & later.
2. In the Locate folder screen, browse to the location of the extracted download and select the
Loadbalancer.org Ent. VA folder.
3. Click Next until you reach the Choose Import Type screen, select the option Copy the virtual machine
(create a new unique ID) and click Next.
4. In the Choose Folder For Virtual Machine Files screen, tick (check) the checkbox Store the Virtual Machine
in different location, then select a suitable location for the virtual machines files and click Next.
5. In the Choose Folder to store Virtual Hard Disks screen, select a suitable location for the virtual hard disk
files and click Next.
6. In the Completing Import Wizard screen, verify that all settings are correct and click Finish to complete the
import process. To change a setting, use the Previous button to navigate back through the screens as
required.
Once complete, the load balancer will appear in the Virtual Machines list.
For a clustered pair, make sure that you select a different folder location in steps 4 & 5.
2. Select the first network adapter and set the required virtual switch that the adapter should be connected to.
This will be eth0 when viewed in the appliance WebUI.
3. Click Apply.
KVM
Network cards are set to NAT by default so adjust as needed before powering on. Please also
refer to the XML file for additional configuration notes.
Nutanix AHV
For detailed installation and deployment guidance, please refer to our Nutanix blog.
XEN
The following steps should be followed on the XEN host:
As mentioned in the text, to perform initial network configuration, login as the "setup" user at the appliance
console.
Once logged in, the Network Setup Wizard will start automatically. This will enable you to configure the
management IP address and other network settings for the appliance.
Username: setup
In the Configure Management IP screen, leave Yes selected and hit <ENTER> to continue.
In the Peer Recovery screen, leave No selected and hit <ENTER> to continue.
For more details on node recovery using this option please refer to Disaster Recovery After Node
(Primary or Secondary) Failure.
In the Centralized Management screen, if you would like to enroll the appliance with a management server
(typically portal.loadbalancer.org), select Yes, otherwise leave No selected, then hit <ENTER> to continue. If you
select Yes, you’ll be asked to confirm the server’s details and provide login credentials at the end of this setup
process.
For information on how to modify Centralized Management settings via the WebUI, please refer
to Portal Management & Appliance Adoption.
In the Available Interfaces screen, a list of available interfaces will be displayed, hit <ENTER> to continue.
If you select Yes, the Select Interfaces screen will be displayed. Using the space bar, select the interfaces you’d
like to include in the bond, select Create and hit <ENTER> to continue.
In the Configure a VLAN screen, select Yes if you want to configure a VLAN, if not leave No selected, then hit
<ENTER> to continue.
In the Configure Management IP screen, select the interface that’ll be used to manage the appliance, then hit
<ENTER> to continue.
In the Set IP address screen, either enter the required Static IP Address & CIDR Prefix and select Done or select
Use DHCP, then hit <ENTER> to continue.
A subnet mask such as 255.255.255.0 is not valid, in this case enter 24 instead.
In the Configure Default Gateway screen, enter the required Default Gateway IP Address, select Done and hit
<ENTER> to continue.
In the Configure DNS Servers screen, configure the required DNS server(s), select Done and hit <ENTER> to
continue.
Enter the Password you’d like to use for the loadbalancer WebUI user account and the root Linux user account.
Repeat the password, select Done and hit <ENTER> to continue.
If you selected Yes when asked if you want to enroll for Centralized Management, you’ll now be prompted for the
details. Default values for the Host and Port are set and can be changed if required. Enter the Username and
Password for the management server account you’d like the appliance to be associated with, select Done and hit
<ENTER> to continue.
In the Summary screen, check all settings. If everything is correct, leave Configure selected and hit <ENTER> to
continue. All settings will be applied. If you need to change a setting, use the Back button.
There are certain differences when accessing the WebUI for the cloud appliances. For details,
please refer to the relevant Quick Start / Configuration Guide.
https://<IP-address-configured-during-the-network-setup-wizard>:9443/lbadmin/
You’ll receive a warning about the WebUI’s SSL certificate. This is due to the default self
signed certificate that is used. If preferred, you can upload your own certificate - for more
information, please refer to Appliance Security Features.
If you need to change the port, IP address or protocol that the WebUI listens on, please
refer to Service Socket Addresses.
Username: loadbalancer
Password: <configured-during-network-setup-wizard>
To change the password, use the WebUI menu option: Maintenance > Passwords.
If you’ve already purchased a license, please refer to Installing the License Key.
Username: root
Password: <configured-during-network-setup-wizard>
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
For Windows hosts PuTTy can be used for SSH access and WinSCP can be used for secure file
transfer.
If you need to change the port or IP address that SSH listens on, please refer to Service Socket
Addresses. The allowed ciphers and other advanced SSH settings can be configured using the
WebUI menu option Local Configuration > Physical - Advanced Configuration and scrolling to the
SSH Service section.
Keyboard Layout
By default the appliance is configured with a US keyboard layout. The layout can be changed by editing the file
/etc/sysconfig/keyboard. For example, to change the layout from US to UK:
1. edit /etc/sysconfig/keyboard using a text editor such as vi or vim for Linux or WinSCP under Windows.
if you’re conducting a PoC (Proof of Concept) using the VA and require more time to complete
your evaluation, please contact sales@loadbalancer.org who will be able to provide guidance on
how to extend the trial.
1. Using the WebUI, navigate to: Local Configuration > License Key.
2. Click Choose File then browse to and select the license file provided when the appliance was purchased.
Once the license is applied, these warning messages will no longer be displayed.
Services may need to be restarted/reloaded after the update process completes or in some
cases a full appliance restart may be required. We therefore recommend performing the update
during a maintenance window.
Online Update
Auto-Check for Updates
The appliance periodically contacts the Loadbalancer.org update server (update.loadbalancer.org) and checks
for updates. This is the default behavior and can be disabled if preferred. If an update is found, a message will be
displayed at the top of the screen as shown in the following example:
4. Click Update.
3. If the latest version is already installed, a message similar to the following will be displayed:
4. If an update is available, details of any new features, improvements, bug fixes & security updates included
will be displayed.
Do not navigate away whilst the update is ongoing, this may cause the update to fail.
6. The update can take several minutes depending on download speed and upgrade version. Once complete
the following message will be displayed:
7. If services need to be reloaded/restarted or the appliance needs a full restart, you’ll be prompted accordingly.
Offline Update
If the appliance does not have access to the Internet, offline update can be used.
Please contact support@loadbalancer.org to check if an update is available and obtain the latest
offline update files.
4. Using the Choose File buttons, select the Archive and Checksum files that were provided by
Loadbalancer.org support.
For a clustered pair, we recommend fully testing & validating the Primary/Secondary failover
process before going live. For more information, please refer to Testing & Verifying
Primary/Secondary Replication & Failover.
Network Configuration
Physical/Virtual Adapters
If multiple logical interfaces are required, these can be added by specifying multiple IP addresses as shown
below. If additional network connectivity is required, an external switch can be used.
Typically, the main reason for using all 4 or 6 interfaces is when bonding (e.g. 802.3ad) is required in a two-arm
NAT or SNAT mode highly available configuration.
Multiple VLANs can be configured if required. For details, please refer to Configuring VLANs.
For the VMware appliance, only the first adapter (eth0) is connected by default. For HyperV,
KVM, XEN and Nutanix AHV all adapters are disconnected by default. Use the network
configuration screen within the Hypervisor to connect the required adapters.
Configuring IP Addresses
Initial network settings including the management IP address are configured using the Network Setup Wizard. For
more information, please refer to Configuring Initial Network Settings.
Once the management address is configured, additional IP addresses can be configured using the WebUI menu
option: Local Configuration > Network Interface Configuration.
For one-arm deployments, eth0 is normally used. For two-arm deployments, eth0 is typically used as the internal
interface and eth1 is used as the external interface. This is not mandatory and each interface can be used for any
purpose.
CIDR notation is used to specify IP addresses and subnet masks. For example, to specify an IP address of
192.168.2.100 with a subnet mask of 255.255.255.0, 192.168.2.100/24 would be entered in the relevant
interface field as shown in the example below:
For information on CIDR notation, please refer to Appliance IPv4 Address Format (CIDR
notation).
To configure IP address(es):
1. Using the WebUI, navigate to: Local Configuration > Network Interface Configuration.
Configuring Bonding
Multiple network adapters can be bonded.
To configure bonding:
1. Using the WebUI, navigate to: Local Configuration > Network Interface Configuration.
2. Any of the available adapters can be bonded. For example, to bond eth0 and eth1, select (check) the eth0
and eth1 checkboxes as shown below:
Mode 0 - Balance round robin. Transmits packets in a numerical order from the first available Secondary
through to the last.
Mode 1 - Active Backup (default). This places one of the adapters in a backup state and will only become
active if the link is lost to the active adapter. This mode provides fault tolerance.
Mode 4 - 802.3ad. Dynamic link aggregation mode. This mode requires a switch that supports IEEE 802.3ad.
4. Click Create.
At this point the adapters still have the same IP settings configured previously. Once an IP
address is configured for the bond and Configure Interfaces is clicked, these addresses
will be removed and only the bond address will apply. If the bond is deleted, these
addresses will be re-applied to the adapter(s).
7. If this is a new bonding configuration or the bonding mode has been changed, restart the appliance using
the WebUI menu option: Maintenance > System Control and clicking Restart Load Balancer.
For a clustered pair you’ll need to configure bonding in the same way on both appliances. Failure
to so will result in heartbeat communication issues.
Configuring VLANs
Native 802.1Q VLAN support can be configured if required.
In access mode switch ports are dedicated to one VLAN. The switch handles all the tagging and de-tagging of
frames - the station connected to the port does not need to be configured for the VLAN at all.
In trunk mode the switch passes on the raw VLAN frames - the station connected must be configured to handle
them. Trunk mode is usually used to connect two VLAN-carrying switches, or to connect a server or router to a
switch.
If the load balancer is connected to an access mode switch port, no VLAN configuration is required. If the load
balancer is connected to a trunk port, then all the required VLANs must be configured on the load balancer.
To configure a VLAN:
1. Using the WebUI, navigate to: Local Configuration > Network Interface Configuration.
5. An extra IP Address Assignment field named eth0.250 will be created, enter the required IP address here.
For a clustered pair you must configure VLANs in the same way on both appliances.
Interface Offloading
This will enable (when supported) hardware NIC offloading. This option is enabled by default.
1. Using the WebUI, navigate to: Local Configuration > Physical - Advanced Configuration.
4. Click Update.
1. Using the WebUI, navigate to: Local Configuration > Network Interface Configuration
Unlimited static routes can be configured. Additional rows will be automatically added to the
WebUI screen as needed.
Management Gateway
If you want to manage the appliance from a remote subnet that is accessible via a different gateway, the relevant
management address and associated gateway must be configured. Traffic from the management address is
then routed via the management gateway rather than via the default gateway.
This is not a security feature, it’s a routing option. By default, the WebUI is still accessible on all
appliance IPs as before (unless this has been changed - for more details, please refer to Service
Socket Addresses). Policy based routing is used to provide this feature. For more information,
please refer to the "PBR" section below.
1. Using the WebUI, navigate to: Local Configuration > Physical Advanced Configuration.
The dropdown is populated with all IP addresses that have been assigned to the various
network interfaces.
5. Click Update.
Configuration Example
To enable appliance management on IP 192.168.1.100 from the remote management server shown below:
The following Management Address and Via Gateway settings would be required:
You’ll need to ensure that 192.168.1.100 is configured on eth0. This can be done using the
WebUI menu option: Local Configuration > Network Interface Configuration.
To configure a VIP to return traffic via a custom gateway rather than via the default gateway:
1. Using the WebUI, navigate to: Cluster Configuration > PBR Default Gateways.
3. Configure Local Only according to your requirements. When enabled, only the link local route for the VIP is
set, when not enabled, all link local routes are set.
5. Click Submit.
6. Once configured, the new default PBR gateway will be displayed as shown below:
To delete the new gateway and use the appliance’s standard default gateway, click Delete.
1. Using the WebUI, navigate to: Local Configuration > Hostname & DNS.
5. Click Update.
Service sockets can be configured to listen on all IP’s, the IPv4 loopback address (127.0.0.1), the IPv6 loopback
address (::1) or set to a specific interface address. The default setting for each is shown in the table above.
1. Using the WebUI, navigate to: Local Configuration > Physical - Advanced Configuration.
4. Click Update.
5. Restart the relevant service(s) using the button(s) in the "Commit changes" message box at the top of the
screen.
Security Mode
To control how the appliance is accessed and which features are enabled, three security modes are provided:
Custom - In this mode the following security options can be configured to suit your requirements:
Disable Console Access - Disable root user console access
Disable SSH Password Access - Disable SSH password access, users must use SSH keys to login
Web User Interface via HTTPS only - WebUI connections are forced to use HTTPS, connections are
redirected to the port specified in the HTTPS Port for Web User Interface field
Secure - (Default) - In this mode:
"root" user console access & SSH password access are disabled
WebUI connections are forced to use HTTPS
Access to the Local Configuration > Execute shell command menu option is disabled
The Firewall Script & the Firewall Lockdown Wizard Script cannot be edited
4. Specify the HTTPS port for the Web User Interface - the default is 9443.
This port must be the same as the port specified for the WebUI’s HTTPS Service Socket
Address. For more details, please refer to Service Socket Addresses.
5. Select the required Web Interface SSL Certificate for the WebUI. If no certificates have been uploaded, the
appliance’s default self-signed certificate is used.
Certificates can be created/uploaded using the WebUI menu option: Cluster Configuration
> SSL Certificate.
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-
AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256
7. Click Update.
# passwd
As mentioned in the section above, "root" user console and SSH password access are disabled
by default. These options can be enabled using the WebUI option: Local Configuration >
Security. You’ll need to Set Appliance Security Mode to Custom, enable the required option(s)
and click Update.
For the AWS and Azure cloud products it’s not possible to directly login as "root". If root access
is required, once you’ve logged into the console/SSH session using the credentials configured
during instance deployment, run the following command:
$ sudo su
maintuser maint same as reportuser plus can also take servers on/off line & create
the support download archive file
Notes
1. It’s not possible to change the group for the "loadbalancer" account.
All WebUI accounts are disabled by default. The "loadbalancer" account is enabled when a password is set using
the Network Setup Wizard. The "configuser", "reportuser" and "maintuser" accounts are enabled when a password
is set as described below.
Menu / Permissions
Configuring Passwords
4. If the user will be authenticated by an external LDAP/ADAuth or RADIUS system, enable (check) the
LDAP/ADAuth User checkbox.
It’s possible to reset passwords via the command line if required. To do this login as "root" at the console or via an
SSH session and run the following command:
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
External Authentication
The appliance supports the following external authentication methods:
LDAPS
Active Directory
Radius
Once a user is configured to use external authentication, they must use their credentials for that system to
access the appliance. It’s important to remember that the username specified in the Add New User screen must
be the exact same username used in the external authentication system.
To demonstrate this feature, an LDAP example is presented below. The steps required to configure other external
authentication systems are similar.
lbauthconfig
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
This script will setup either LDAP or RADIUS authentication for the Load Balancer WUI.
It should be noted that it does not disable the local user access for users such as
"loadbalancer", "maintenance" and "reports" (Or any other additional locally created users)
so it is recommended that once you have tested Auth works successfully that you then assign
long and complex passwords to these users and file them away.
It should also be noted that you will need to add users to the load balancer in order for them
to gain access, authentication is handled by the external authentication method but access is
still controlled by the load balancers default groups so local users identical to those stored
in the external auth provider are required.
To configure LDAP, enter 2 and hit <ENTER>
Specify the hostname or IP address of your LDAP server, e.g. 192.168.112.1 and hit <ENTER>.
Leave the Port blank to use the default value (389) or specify a different port and hit <ENTER>.
Specify the LDAP search base string for your domain, e.g. DC=lbtestdom,DC=com and hit <ENTER>.
Specify the LDAP attribute to authenticate against, e.g. UserPrincipalName and hit <ENTER>.
Step 5. Enter the credentials for a user who can browse the directory.
Username: lbuser@lbtestdom.com
Password:
Specify the credentials for a user who can browse the directory, e.g. lbuser@lbtestdom.com and hit
<ENTER>.
This account must be able to list the current users. It should not be deleted since it is also
used when additional users are added. If the password is changed, steps 1 - 6 must be
repeated.
Specify the username of the first LDAP authenticated user, e.g. tom@lbtestdom.com and hit <ENTER>.
Finished.
The new user will be added to the appliance and can be viewed using the WebUI menu option: Maintenance >
Passwords. When the user logs in they must use their LDAP credentials.
Once the first user has been added, additional users can be added using the Add New User screen which is
accessible via the WebUI option: Maintenance > Passwords as shown below:
User tim@lbtestdom.com will now be able to login to the appliance with report user access rights using his LDAP
credentials.
Firewall Configuration
The firewall can be configured using the WebUI script editor. This enables iptables rules and any other required
commands to be easily configured. The editor allows you to directly edit /etc/rc.d/rc.firewall.
3. Specify additional rules anywhere in the script above the last two lines:
4. Click Update.
For a clustered pair, make sure you configure the firewall script in the same way on both
appliances.
rc.lockdownwizard - this file contains the script that can be changed.
rc.lockdownwizard.conf - this file contains a set of variable definitions and is written automatically when the
Update firewall lock down button is clicked. The file depends on the rc.lockdownwizard script and the load
balancer’s current configuration. This file should not be changed manually.
When run, rc.lockdownwizard loads the settings from the definitions file rc.lockdownwizard.conf and uses them
to generate the firewall rules. You can modify rc.lockdownwizard via ssh or from the WebUI using the Modify the
firewall lock down wizard script button.
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
The default script does not depend on the configured Virtual Services or Real Servers, so the wizard does not
need to be re-run when services are changed. However, it does depend on the IP addresses of the Primary and
Secondary appliance, and the admin related ports used by the WebUI, heartbeat, and HAProxy. If those settings
are changed, the firewall lockdown wizard will need to be re-run in order to reflect the changes. Re-running the
firewall lockdown wizard will adapt the rc.lockdownwizard.conf definitions file automatically - any changes made
to the script rc.lockdownwizard will remain when you re-run the firewall lockdown wizard.
If you plan to configure an HA pair, either run the lockdown script on each appliance after the
pair has been configured, or if it has already been run, temporarily disable the script (on both
appliances) whilst performing the pairing process.
1. Using the WebUI, navigate to: Maintenance > Firewall Lock Down Wizard.
To specify additional management subnets/hosts, click the Modify the firewall lock down
wizard script button and scroll down to the IPV4_NET_ADMIN parameter. Uncomment the
line and specify additional subnets separated by spaces, e.g.
IPV4_NET_ADMIN=(192.168.4.0/24 192.168.6.0/24)
1. To disable the lock-down script uncheck the Enable lock down script checkbox and click the Update Firewall
lock down button.
If you accidentally block your own access to the appliance you will need to clear the current
firewall rules and try again. To completely clear the firewall rules use the following command at
the console:
/etc/rc.d/rc.flush-iptables
For a clustered pair you’ll need to run/configure the firewall lockdown wizard/script in the same
way on both appliances.
1. Using the WebUI, navigate to: Local Configuration > Physical - Advanced Configuration.
4. Click Update.
the password for the "loadbalancer" WebUI account
the password for the Linux "root" account
from which subnet/host WebUI and SSH access is permitted
It also regenerates the SSH keys that are used to secure communicating between the Primary and Secondary
appliance. To start the script, at the console or via an SSH terminal session run the following command:
lbsecure
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
The following illustrates how the script works for a single appliance:
You will be asked to provide new passwords for the web interface and the
console root account, plus an IP subnet that should be allowed remote access
to the load balancer's web interface and ssh console.
Please enter a new password for the web interface 'loadbalancer' user. The
password will not be displayed as you type.
New web interface password: ********
Confirm password:
Please enter a new password for the console 'root' user. The password will not
be displayed as you type.
This password will also be used for the console 'setup' user.
New console password:
Confirm password:
Please enter an IP subnet that should be allowed remote access to the web
interface and ssh console.
Note that any host outside of this subnet will immediately lose access to the
load balancer. If you are running this script remotely, that includes the
current console.
Administration subnet: 192.168.10.0/24
Working...
Setting up firewall...
Once the script has finished, the "Security enhancement complete" message is displayed as shown above.
If lbsecure is run on the Primary of a correctly configured HA pair, the passwords, firewall rules
and SSH keys will also be updated on the Secondary appliance.
You should run lbsecure after configuring the HA pair to ensure the correct HA related ports are
configured in the firewall rules.
To reverse the action of lbsecure, the lbinsecure command can be used. For a clustered pair, run
lbinsecure on both Primary and Secondary appliances to completely reverse the configuration
applied by running lbsecure.
SSH Keys
This menu option enables SSH keys to be managed.
1. Using the WebUI, navigate to: Local Configuration > SSH Keys.
Host Keys - the host identification key(s) of the local host
User Keys - the public key(s) of the user presented to remote hosts
The second tab (SSH Authentication) enables the following keys to be viewed & managed:
Host Keys (known_hosts) - the key(s) of known hosts that have been previously connected to or
have been preconfigured. For an HA pair the peer appliance’s keys will be shown.
User Keys (authorized_keys) - the public key(s) of remote hosts that can log in as the specified
user. For an HA pair the peer appliance’s keys will be shown.
1. Using the WebUI, navigate to: Local Configuration > System Date & Time.
3. Specify the required NTP server(s) using the NTP Servers fields.
Manual Configuration
To manually set the date & time:
1. Set the data & time using the Date & time fields.
1. Using the WebUI, navigate to: Local Configuration > Physical Advanced Configuration.
6. Click Update.
1. Using the WebUI, navigate to: Local Configuration > Physical Advanced Configuration.
4. Click Update.
1. Using the WebUI, navigate to: Local Configuration > Physical Advanced Configuration.
5. Specify the required Rate limit Burst limit, the default is 200 messages.
If the load balancer has been configured to keep detailed logs of multiple services, and
your syslog server is heavily loaded, we recommend that UDP is used - this is the default.
SNMP Configuration
The appliance supports SNMP v1, v2 and v3.
To configure SNMP:
1. Using the WebUI, navigate to: Local Configuration > SNMP Configuration.
Enter the required SNMP v1/v2 community string.
Specify the USM Username.
Select the required USM Authorization Algorithm.
Specify the USM Authorization Passphrase, it should be at least 8 characters.
Select the required USM Privacy Algorithm.
Specify USM Privacy Passphrase, it should be at least 8 characters.
6. Click Update.
7. Restart SNMPD using the Restart SNMPD button at the top of the screen.
Valid characters for the Community string, USM Username, USM Authorization Passphrase and
USM Privacy Passphrase fields are: a-z A-Z 0-9 [ ] # ~ _ * ! = - $ % ? { } @ : ; ^
For more information about the various OIDs and associated MIBs supported by the appliance,
please refer to SNMP Reporting.
1. Using the WebUI, navigate to: Local Configuration > Execute Shell Command.
Commands that run continuously when executed should be run with a specific count to ensure
that they will terminate gracefully and the results can be displayed in the WebUI.
ping -c 4 192.168.100.254
"Execute Shell Command" is disabled by default. This can be enabled using the WebUI menu
option: Local Configuration > Security. Set Appliance Security Mode to Custom then click
Update.
1. Using the WebUI, navigate to: Local Configuration > Portal Management.
3. To view or change the hostname/IP address and port of the Portal click [Advanced].
In most cases the default values for Hostname and Port do not need to be changed.
4. Click Update.
5. To apply the new settings, the Gateway and Shuttle services must be restarted. This can be done using the
buttons in the "Commit changes" box at the top of the screen.
1. Enter the Portal Email & Portal Password for the account you’d like the appliance to be associated with.
1. In the Portal, using the Services dropdown at the top of the page, select ADCs.
2. Using the menu on the left, select Shuttle Management, if the details have been specified correctly, the
shuttle for the appliance added will appear in the list as shown below.
3. Click the Adopt button for the new shuttle to complete the shuttle adoption process.
1. In the Portal, using the Services dropdown at the top of the page, select ADCs.
2. In the ADCs menu, select List then click the Add ADC button.
5. Click Next.
9. Click Next.
15. Enter any required Notes and Tags to describe the appliance and click Next.
16. Verify all settings, these can be changed if needed using the relevant Edit option.
17. Click Submit - if the details have been specified correctly, the adopted appliance will appear in the list.
The Portal connection method above uses a shuttle and conection for each ADC. It’s also
possible to configure a single dedicated shuttle and use this for all ADCs. For more information,
please refer to the Portal Quickstart Guide and the ADC Portal page on our website.
Restart Ldirectord
Restarting Ldirectord will result in a loss of layer 4 services during the restart.
Reload Ldirectord
Reloading Ldirectord may result in a loss of layer 4 services during the reload.
Restart HAProxy
Restarting HAProxy will result in a loss of layer 7 services during restart. It will cause any persistence tables to be
dropped and all connections to be closed.
Reload HAProxy
Reloading HAProxy will start a new process with the new configuration if settings have been changed and leave
the current process running. New connections will be passed onto this new process, the old process will maintain
existing connections and eventually terminate when there are no more connections accessing it. If you are using
stick tables for persistence the entries will be copied between processes.
If you have long lasting TCP connections it can take some time for the old HAProxy process to
terminate. This means that those connections will continue to use the old configuration. If this is
an issue, you can use Restart HAProxy instead.
Restart Pound
Restarting Pound will result in a loss of related SSL termination services during the restart.
Restart Nginx
Restarts the fallback web server. There will be a brief window of service interruption.
Reload Nginx
Reloads the configuration of the running fallback web server.
Reload STunnel
Reloading STunnel may result in a loss of related SSL termination services during the reload.
Restart Heartbeat
Restarting heartbeat will cause a temporary loss of all layer 4, layer 7 and SSL services.
Reload Heartbeat
Reloading heartbeat may cause a temporary loss of all layer 4, layer 7 and SSL termination services.
Restart Firewall
All firewall rules will be removed, then reloaded from the current configuration. This may result in a temporary
loss of service.
Restart Syslogd
Restart Syslogd to apply any configuration changes.
Restart Collectd
Restart the graphing data collection daemon Previously collected data will not be lost. Note that collectd will not
start if graphing of all services is disabled.
Restart SNMPD
Restart the SNMPD service on the local system.
Reload Apache
Reload Apache performs a graceful restart which causes the parent process to advise the children to exit after
their current request (or immediately if they’re not serving anything). The parent then reloads its configuration and
log files. As each child dies off the parent replaces it with a child with the updated configuration, which begins
serving new requests immediately.
Restart WAF
Restarting the WAF will drop all current connections are re-read the config.
Reload WAF
Reload the WAF and re-read the config.
Restart GSLB
Restart GSLB services to make live any changes to configuration. This will impact live services.
Reload GSLB
Reload GSLB services to make live any changes to configuration. This should not impact live services.
Restart Gateway
Restart the loadbalancer management gateway service.
Restart SSH
Restart the SSH service. This will cause a brief outage of the service.
1. Using the WebUI, navigate to: Maintenance > Backup & Restore > Restore Tab.
lbrestore
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
Layer 4 Services
The Basics
Layer 4 services are based on LVS (Linux Virtual Server). LVS implements transport layer load balancing inside
the Linux kernel. It is used to direct requests for TCP/UDP based services to the Real Servers and makes services
on the Real Servers appear as a Virtual Service on a single IP address.
With the exception of Layer 4 SNAT mode, Layer 4 services are transparent by default, i.e. the source IP address
is maintained through the load balancer to the Real Servers.
Layer 4 persistence is based on source IP and is enabled by default. The time out value is in seconds and each
time the client makes a connection the timer is reset, so a 5 minute persistence setting could last for hours if the
client is active and regularly refreshes their connection.
When a VIP is added, the load balancer automatically adds a corresponding floating IP address which is activated
instantly. You can use the WebUI option: View Configuration > Network Configuration to ensure that the floating
IP address is active. It will be listed as a secondary address/alias.
Multiple ports can be specified, for example 80 & 443. In this case persistence is useful to ensure that clients hit
the same backend server for both HTTP & HTTPS traffic and also to prevent the client having to renegotiate the
SSL connection.
It’s not possible to configure a VIP on the same IP address as any of the network interfaces.
This ensures services can "float" (move) between Primary and Secondary appliances when
using an HA Pair.
Each Virtual Service can have an unlimited number of Real Servers. Typically you’ll need one Virtual Service for
each distinct cluster (group of load balanced servers). For example, you could create a VIP for a web cluster,
another for an FTP cluster and a third for a SIP cluster.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 4 - Virtual Services.
For the Virtual Service to listen on all IP addresses configured on the appliance (including
the management address) specify 0.0.0.0 in the IP address field.
5. Enter the required port(s) in the Ports field. Separate multiple ports with commas, specify a range with a
hyphen and specify all ports using an asterisk (*).
Several ports are used by the appliance and therefore cannot be used for Virtual Services.
For full details, please refer to Ports Used by the Appliance.
TCP - Transmission Control Protocol is the default and most common option
UDP - User Datagram Protocol - used for DNS, SIP, etc.
TCP/UDP - enable both TCP and UDP on the port(s) specified
One Packet Scheduling - used for UDP SIP connections
Firewall Marks - For use when traffic has been tagged in the firewall script using the MARK target
Direct Routing (DR) - This is the default mode for new Layer 4 VIPs. To use this mode, the "ARP
Problem" must be solved on each Real Server. For more information on DR mode, please refer to Layer
4 DR Mode.
NAT - With this mode, the Real Server’s default gateway must be changed to be the load balancer.
Because the load balancer also handles the return traffic, NAT mode is slower than DR mode. For more
information on NAT mode, please refer to Layer 4 NAT Mode.
SNAT - The mode requires no Real Server changes but is not as fast as DR mode. Also it’s non
transparent and therefore looses the client source IP information. You should not use the same
RIP:PORT combination for layer 7 SNAT mode VIPs and layer 4 SNAT mode VIPs because the required
firewall rules conflict. For more information on SNAT mode, please refer to Layer 4 SNAT Mode.
8. Click Update.
9. To configure the Real Servers, please refer to Creating Layer 4 Real Servers (RIPs).
This option copies all Virtual Service settings and the associated Real Servers. Once duplicated,
you’ll need to change either the IP address or port for the new VIP so that it does not clash with
the original.
4. The VIP will be duplicated with a new label, all other settings will be identical.
5. Change either the IP Address or Port to ensure it does not clash with the source VIP.
7. Click Update.
Connection Balance Mode Select the required method to distribute new connections. The options are:
Distribution
Method
Weighted Least-Connection (default) - assign more jobs to servers with
fewer jobs, relative to the Real Server’s weight.
Weighted Round Robin - assign jobs to Real Servers proportionally to
the Real Server’s weight. Servers with higher weights receive new jobs
first and get more jobs than servers with lower weights. Servers with
equal weights get an equal distribution of new jobs.
Destination Hash - assign jobs to servers through looking up a statically
assigned hash table by their destination IP addresses. This algorithm is
designed for use with web proxies and is supported with Layer 4 DR
mode Virtual Services only.
Sticky or persistent connections are required for some protocols such as FTP
and SIP. It is also kind to clients when using SSL and is sometimes required
with HTTP if your web application cannot keep state between Real Servers.
Timeout How long do you want connections to be sticky? The persistence time is in
seconds and is reset on every connection. By default this is set to 300s (5
mins).
Granularity Specify the granularity with which clients are grouped for persistent Virtual
Services. The source address of the request is masked with this netmask to
direct all clients from a network to the same Real Server. The default is
255.255.255.255, that is, the persistence granularity is per client host. Less
specific netmasks may be used to resolve problems with non-persistent
cache clusters on the client side.
Health Checks Check Type Specify the type of health check to be performed on the Real Servers. As the
Check Type dropdown is changed, the related field list changes. The options
are:
Negotiate - Scan the page specified in Request to Send, and check the
returned data for the Response Expected string.
Connect to port - Attempt to make a connection to the specified port.
Ping Server - Use a simple ICMP ping to perform health checks.
External script - Use a custom file for the health check. For more
information, please refer to External Health Check Scripts
No checks, always off - all Real Servers are marked offline.
No checks, always on - all Real Servers are marked online.
5 Connects, 1 Negotiate - Repeating pattern of 5 Connect checks
followed by 1 Negotiate check.
10 Connects, 1 Negotiate - Repeating pattern of 10 Connect checks
followed by 1 Negotiate check.
Check Port If you want the check port to be different to the port specified for the VIP, set
it here. For a multi-port VIP, by default the first port in the list will be used as
the check port.
Feedback Feedback The method the load balancer uses to measure to performance of the Real
Method Servers. The options are:
Agent - A simple telnet to port 3333 on the Real Server.
HTTP - A simple HTTP GET to port 3333 on the Real Server.
None - No feedback (default setting).
The load balancer expects a 0-99 integer response from the agent, usually
relating to the CPU idle; i.e. a response of 92 would imply that the Real
Server’s CPU is 92% idle. The load balancer will then use the formula (92/100
* requested_weight) to find the new weight.
Fallback Server IP Address The server to route to if all of the Real Servers fail their health check. By
default the fallback server is set to be the local NGINX instance.
You can also configure the fallback server to be a "hot spare" if required. To
do this, configure the primary server as a Real Server and set the secondary
server as the fallback server.
Port The port of the fallback server. For DR mode and TUN mode with masq
disabled, the port should not be specified so that it defaults to the same as
the Virtual Service.
MASQ Fallback Masquerade fallback. When enabled, this enables the fallback server to be set
as a Layer 7 Virtual Service. This is especially useful in WAN/DR site
environments.
Email Alert Destination email address for server health check notifications.
Destination
Address
For more information on configuring email alerts, please
refer to Configuring Email Alerts for Virtual Services.
If you require a custom gateway for a particular VIP, this can be achieved using Policy Based
Routing. For more information, please refer to Policy Based Routing (PBR).
1. Using the WebUI, navigate to: Cluster Configuration > Layer 4 - Real Servers.
2. Click Add a new Real Server next to the relevant Virtual Service.
This field only applies to NAT mode and SNAT mode. In DR mode and TUN mode, port
redirection is not possible so traffic is passed through on the same port that it was
received on by the VIP.
6. Specify the required Weight, this is an integer specifying the capacity of a server relative to the others in the
pool, valid values are 0 to 65535, the default is 100. The higher the value, the more connections the server
will receive. If the weight is set to 0, the server will effectively be placed in drain mode.
7. Specify the Minimum Connections, this is an integer specifying the lower connection threshold of a server.
The valid values are 0 through to 65535. The default is 0, which means the lower connection threshold is not
set. If set, the server will receive new connections when the number of its connections drops below its lower
connection threshold. If not set but Maximum Connections is set, the server will receive new connections
when the number of its connections drops below 3/4 of its upper connection threshold.
8. Specify the Maximum Connections, this is an integer specifying the upper connection threshold of a server.
The valid values of Maximum Connections are 0 through to 65535. The default is 0, which means the upper
connection threshold is not set.
9. Click Update.
DR Mode Considerations
The ARP Problem
DR mode works by changing the MAC address of the inbound packets to match the Real Server selected by the
load balancing algorithm. To enable DR mode to operate:
1. The load balanced application/service/daemon running on each Real Server must be able to accept traffic
destined for the VIP address and the Real Server’s own IP address (RIP). This is because in DR mode the
2. Each Real Server must be configured so that it does not respond to ARP requests for the VIP address - only
the load balancer should do this.
Configuring the Real Servers in this way is known as "Solving the ARP Problem". The steps required depend on the
particular operating system being used.
If this is the case, it’s normally a good indication that the "ARP Problem" has not been solved.
Modifying the server’s ARP behavior and adding the relevant VIP addresses to the loopback interface
Using NAT to convince the server to accept and reply to packets addressed to the relevant VIP addresses
Four independent methods are described below along with instructions. Each method follows one of the two
approaches above. The specific method chosen will depend on technical requirements, the Linux distribution in
use, and personal preferences.
The first method involves setting kernel parameters to alter the server’s ARP behavior and adding IP addresses to
the loopback interface. This method should be universally applicable to any Linux server making this the
preferred method.
If setting kernel parameters and adding IP addresses is not possible for some reason, the remaining three
methods describe setting up a server for DR mode operation by using NAT via the redirect target/statement. The
specific instructions depend on the packet filtering framework and tooling in use, which varies between Linux
distributions. Methods are presented for iptables, nftables, and the firewall-cmd tool.
Each real server needs the loopback interface to be configured with the virtual IP addresses (VIPs) of the relevant
load balanced services. This is often just a single VIP address, but the logic described below can be extended to
cover multiple VIPs on a server. Having the VIPs on the loopback interface allows the server to accept inbound
load balanced packets that are addressed to a VIP.
The server must not respond to ARP requests for the VIP addresses. The server also must not use ARP to
announce the fact that it owns the VIP addresses. This is necessary to prevent IP address conflicts, as all of the
real servers and the load balancer will own the VIP addresses. Only the load balancer should announce ownership
of the VIPs.
To configure the behavior described above, follow all of the steps below on each real server.
Add the following lines to the file /etc/sysctl.conf (create this file if it does not already exist):
net.ipv4.conf.all.arp_ignore=1
net.ipv4.conf.eth0.arp_ignore=1
net.ipv4.conf.eth1.arp_ignore=1
net.ipv4.conf.all.arp_announce=2
net.ipv4.conf.eth0.arp_announce=2
net.ipv4.conf.eth1.arp_announce=2
Adjust the commands shown above to suit the server’s network configuration, e.g. a different number of network
interfaces or a different interface naming convention.
For reference, the effect of these kernel parameter changes on the server is as follows:
arp_ignore=1: This configures the server to only reply to an ARP request if the request’s
target IP address is local to the incoming interface. This can never be true for VIP
addresses on the loopback interface, as the loopback interface can never be an incoming
interface for ARP requests from other devices. Hence, ARP requests for VIP addresses are
always ignored.
arp_announce=2: This prevents the server from sending an ARP request out of an
interface A where the ARP request’s sender/source address is stated to be an IP address
that is local to some other interface B. For example, this prevents the server from sending
an ARP request from a VIP address (which is local to the loopback interface) out of eth0,
which would announce that the server owns the VIP address.
Add the following lines to the file /etc/sysctl.conf (create this file if it does not already exist):
For reference, the effect of these kernel parameter changes on the server is as follows:
dad_transmits=0: This prevents a given interface from sending out duplicate address
detection probes in order to test the uniqueness of unicast IPv6 addresses. Any IPv6 VIP
addresses will not be unique, so this mechanism is disabled.
accept_dad=0: This prevents a given interface from accepting duplicate address
detection messages. This prevents any IPv6 VIP addresses from being marked as
duplicate addresses.
/sbin/sysctl -p
Steps 1, 2, and 3 can be replaced by instead modifying the necessary kernel variables by writing
directly to their corresponding files under /proc/sys/. Note that changes made in this way will
not persist across reboots.
Execute the following commands (as root) to implement these temporary changes (adapting the
number of interfaces and interface names as needed):
As an alternative, the ip command can be used as a universal way to add IP addresses to any Linux server. Note
that addresses added in this way will not persist across reboots. To make these addresses permanent, add the
ip commands to an appropriate startup script such as /etc/rc.local.
To check that the VIPs have been successfully added, execute the command:
ip addr ls
To remove an IPv4 VIP from the loopback adapter, execute the command:
To remove an IPv6 VIP from the loopback adapter, execute the command:
Execute the following command to put the necessary iptables rule in place to redirect traffic for a single IPv4 VIP
address. Note that iptables rules added in this way will not persist across reboots. To make such a rule
permanent, either add the rule to an iptables firewall script, if one is provided with the Linux distribution in
question, or add the command to an appropriate startup script such as /etc/rc.local on each real server.
The VIP address should be changed to match the virtual service in question, for example:
The example above will redirect any incoming packets destined for 10.0.0.21 (the virtual service) locally, i.e. to the
primary address of the incoming interface on the real server.
If a real server is responsible for serving multiple VIPs then additional iptables rules should be added to cover
each VIP.
For an IPv6 VIP address, a command like the following should be used:
The VIP address should be changed to match the virtual service in question, for example:
Method 2 may not be appropriate when using IP-based virtual hosting on a web server. This is
because an iptables REDIRECT rule will redirect incoming packets to the primary address of the
incoming interface on the web server rather than any of the virtual hosts that are configured.
Where this is an issue, use method 1 instead.
nftables can be used on each real server to identify incoming packets that are addressed to a virtual IP address
(VIP) and redirect those packets to the server itself. This is achieved using the redirect statement in nftables,
which performs the necessary NAT to make this possible. This allows a real server to accept packets addressed
to a VIP without the server owning the VIP.
Use a script like the following to put the necessary nftables structures in place to redirect traffic for both IPv4 and
IPv6 VIP addresses. To make such a configuration permanent, either add the inet nat table to an nftables
firewall script, if one is provided with the Linux distribution in question, or configure a script like the following to
execute as a startup script on each real server.
#!/usr/sbin/nft -f
The VIP addresses and comments should be changed to match the virtual services in question, for example:
#!/usr/sbin/nft -f
The example above will redirect any incoming packets destined for 10.0.0.21 or 2001:db8::10 (the virtual services)
locally, i.e. to the primary address of the incoming interface (for each IP version) on the real server.
Note that Linux kernels prior to 5.2 may not support performing NAT (which is required for the redirect
statement) in an inet family table. In this scenario, use either an ip or an ip6 family table instead, or both if a
mixture of IPv4 and IPv6 VIPs are in use on the same server. Also note that older kernels may not support the use
of comments in chains.
Note that Linux kernels prior to 4.18 require explicitly registering both prerouting and postrouting chains in order
for the implicit NAT of the redirect statement to be correctly performed in both the inbound and outbound
directions.
#!/usr/sbin/nft -f
table ip nat {
chain prerouting {
type nat hook prerouting priority -100; policy accept;
ip daddr 10.0.0.21 counter redirect comment "VIP 1: HTTP"
}
chain postrouting {
type nat hook postrouting priority 100; policy accept;
}
}
chain postrouting {
type nat hook postrouting priority 100; policy accept;
}
}
Method 3 may not be appropriate when using IP-based virtual hosting on a web server. This is
because an nftables redirect statement will redirect incoming packets to the primary address of
the incoming interface on the web server rather than any of the virtual hosts that are configured.
Where this is an issue, use method 1 instead.
The VIP address should be changed to match the virtual service in question, for example:
To apply the new configuration, reload the firewall rules like so:
firewall-cmd --reload
Configuration applied in this way will be permanent and will persist across reboots.
Method 4 may not be appropriate when using IP-based virtual hosting on a web server. This is
because an iptables REDIRECT rule will redirect incoming packets to the primary address of the
incoming interface on the web server rather than any of the virtual hosts that are configured.
Where this is an issue, use method 1 instead.
You’ll need to add this to the startup scripts on all of your Real Servers.
The configuration survives a reboot so there’s no need to add this command to a startup script, just run it on each
Real Server.
You’ll need to add this to the startup scripts on all of your Real Servers.
Failure to correctly configure the Real Servers to handle the "ARP Problem" is the most common
issue when using DR mode.
In addition, the strong/weak host behavior must be configured on each Real Server. The weak host model allows
packets with any IP to be sent or received via an interface. The strong host model only allows packets with an IP
belonging to the interface to be sent or received.
The following 3 steps must be completed on all Real Servers associated with the VIP.
3. Select Install the hardware that I manually select from a list (Advanced), click Next.
You can configure IPv4 or IPv6 addresses or both depending on your requirements.
IPv4 Addresses
1. Uncheck all items except Internet Protocol Version 4 (TCP/IPv4) as shown below:
2. Ensure that Internet Protocol Version (TCP/IPv4) is selected, click Properties and configure the IP address
to be the same as the Virtual Service address (VIP) with a subnet mask of 255.255.255.255, e.g.
192.168.2.20/255.255.255.255 as shown below:
If a Real Server is included in multiple DR mode VIPs, an IP address for each VIP must be
added to the Loopback Adapter.
3. Click OK then click Close to save and apply the new settings.
IPv6 Addresses
1. Uncheck all items except Internet Protocol Version 6 (TCP/IPv6) as shown below:
2001:470:1f09:e72::15/64 is an example, make sure you specify the correct VIP address.
If a Real Server is included in multiple DR mode VIPs, an IP address for each VIP must be
3. Click OK then click Close to save and apply the new settings.
Option 1 - Using network shell (netsh) commands
Option 2 - Using PowerShell cmdlets
The commands in this section assume that the LAN Adapter is named "net" and the Loopback Adapter is named
"loopback" as shown in the example below:
Either adjust the commands to use the names allocated to your LAN and loopback adapters, or
rename the adapters before running the commands. Names are case sensitive so make sure
that the interface names used in the commands match the adapter names exactly.
To configure the correct strong/weak host behavior run the following commands:
For Windows 2012 & later you can also use the following PowerShell Cmdlets to verify the settings:
Failure to correctly configure the Real Servers to handle the "ARP Problem" is the most common
issue when using DR mode.
Solving the ARP Problem - Possible Side Effect for Windows 2012 & Later
With DR Mode, the source IP address of return traffic from a Real Server will be the IP address assigned to the
loopback adapter, which is the same as the VIP address that the client connected to. For traffic initiated by a Real
Server, the source IP address should under normal circumstances be the Real Server’s own IP address, i.e. the
address assigned to the standard network adapter.
To prevent the IP address(es) assigned to the loopback adapter being used in this way, the skipassource flag
must be set for each IP assigned to the loopback adapter.
To check the current skipassource setting for all IPs associated with the loopback adapter, use the following
command:
If your loopback adapter is not named "loopback" modify the command accordingly
Example output:
ipaddress skipassource
--------- ------------
192.168.111.180 false
This shows that for the 192.168.111.180 address, the skipassource flag is not set.
To set the skipassource flag for the 192.168.111.180 address, use the following command:
To clear the skipassource flag for the 192.168.111.180 address, use the following command:
To set the skipassource flag for all IP addresses associated with the loopback adapter, the following two
PowerShell commands can be used:
The first command gathers all IP addresses assigned to the loopback adapter
The second command then sets the SkipAsSource flag for all IPs found
If your loopback adapter is not named "loopback" modify the commands accordingly
To check the current RSC settings for all RSC compatible interfaces, use the following command:
Get-NetAdapterRsc
Example output:
In this example IPv4Operational State and IPv6Operational State are set to True which shows that RSC is
enabled for both IPv4 and IPv6
RSC can be disabled and enabled using the GUI or by using PowerShell commands.
RSC for IPv4 (Recv Segment Coalescing (IPv4)) and for IPv6 (Recv Segment Coalescing (IPv6)) can be
configured using the NIC’s advanced properties tab as shown in the example below:
Using PowerShell
To disable RSC:
or for IPv6
To enable RSC:
or for IPv6
If your network adapter is not named "net" modify the command accordingly
By default, IIS listens on all configured IP addresses as shown in the example below. As can be seen, the IP
address field is set to "All Unassigned".
If the default setting is not changed, no further IIS configuration is required. If you do change the IP address in the
bindings from "All Unassigned" to a specific IP address, then you need to make sure that you also add a binding
for the Virtual Service IP address (VIP) as shown in the example below:
This example illustrates how IIS must be configured to ensure that it’s listening on both the RIP
Whilst NAT mode is fairly straight forward, a few points need to be considered.
2. Non-load balanced services on the Real Servers (e.g. RDP for management access to Windows servers) will
not be accessible since these have not been exposed via the load balancer.
2. Change Auto-NAT from off to the external interface being used - typically eth1.
3. Click Update.
This activates the rc.nat script that forces external network traffic to be MASQUERADED to and from the
external network. The iptables masquerade rule that’s used for this is shown below:
1. Setup a NAT mode Virtual Service listening on the relevant service ports and add the required Real Server
leaving the Real Server Port field blank. The Real Server’s default gateway must be the load balancer.
2. Setup a floating IP address and add SNAT/DNAT rules for each server as shown in the example below, these
lines can be added to the firewall script using the WebUI menu option Maintenance > Firewall Script. The
Real Server will then be accessibe via the floating IP address. Once again, the Real Server’s default gateway
must be the load balancer.
Once configured, firewall entries similar to the following will be listed under View Configuration > Firewall
Rules:
Notes
INT_ADDR can also be any other server on the internal subnet.
Separate floating IPs and SNAT/DNAT rules are needed for each internal server.
The DNAT rule changes the destination IP address of inbound packets from the external floating IP
address (EXT_ADDR) to the internal server’s address (INT_ADDR).
The SNAT rule changes the source IP address of outbound packets from the internal server’s address
(INT_ADDR) to the external floating IP addess (EXT_ADDR).
The default gateway on the internal server must be the load balancer.
If Auto-NAT is already enabled, only the DNAT rule is required.
Replace "192.168.2.0/24" with your subnet address, "192.168.2.21" with your load balancer’s IP
address and "LAN" with the name of the interface on your server.
Then we need to make sure that local network access uses the load balancer as its default route:
route add -net 192.168.2.0 netmask 255.255.255.0 gateway 192.168.2.21 metric 0 dev eth0
Replace 192.168.2.0 & 255.255.255.0 with your local subnet address and replace 192.168.2.21
with the IP address of your load balancer.
Any local traffic (same subnet) is then handled by the manual route and any external traffic is handled by the
default route (which also points at the load balancer).
Firewall Marks
Firewall marks are used to group ports and protocols into a single Virtual Service. For example, firewall marks can
be used to bundle HTTP connections on port 80 and secure HTTPS connections on port 443 for an e-commerce
site. By assigning the same firewall mark to each protocol, state information for the transaction can be preserved
because the load balancer forwards all requests from a particular client to the same Real Server.
When configuring the Real Servers, the Ports field must be left blank as shown below:
Packets will then be forwarded to the Real Servers on the same port as received by the VIP.
For Layer 4 DR mode VIPs, there is no Real Server Port field since port translation is not possible
in this mode.
To create an auto firewall mark VIP that listens on all ports, enter an asterisk (*) in the ports field
rather than a specific port number.
The health check port is automatically set to the first port in the list. This can be changed if
required by modifying the VIP and setting the required port in the Check Port field.
In most cases, it’s not necessary to create firewall marks manually. Multiple ports and protocols
can easily be dealt with using the standard Creating Layer 4 Virtual Services feature.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 4 - Virtual Services.
3. Specify the required Label (name) for the VIP, e.g. Cluster-1.
4. Instead of entering an IP address, enter a numeric value, e.g. 1 - this is the numeric reference for the Firewall
Mark, this reference is used in step 5 below when configuring the firewall rules.
5. The Ports field does not need to be set as it is not relevant in this case - the actual port(s) used are
configured in the firewall script in step 5 below.
6. Set Protocol to Firewall Marks - at this point the Ports field will be grayed out and the IP Address field will be
renamed as Firewall Mark Identifier as shown above.
7. Click Update.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 4 - Virtual Services.
4. Click Update.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 4 - Real Servers.
4. Click Update.
If you’re modifying an existing layer 4 VIP, the floating IP will already exist so this step can be
skipped.
1. Using the WebUI, navigate to: Cluster Configuration > Floating IPs.
2. Add a floating IP that corresponds to the required VIP, in this example 192.168.111.240.
2. Scroll down to the Manual Firewall Marks section and add the following lines as shown below:
VIP1="192.168.111.240"
iptables -t mangle -A PREROUTING -p tcp -d $VIP1 --dport 8025 -j MARK --set-mark 1
3. Click Update.
4. For a clustered pair, make the same changes to the firewall script on the Secondary appliance.
The VIP is now configured and should be accessible on 192.168.111.240, TCP & UDP port 8025.
1. When using firewall marks the load balancer forwards traffic to the selected Real Server without changing
the destination port. So incoming traffic to port 80 on the Virtual IP will be forwarded to port 80 on one of the
Real Servers. Likewise, incoming traffic to port 443 will be forwarded to port 443 on the same Real Server.
2. A single health check port can be configured. For auto-firewall marks this is set as the first port in the list by
default. For manual firewall marks this must be manually configured.
3. You can specify a range of ports rather than a single port as shown below:
This specifies destination ports from 1024 to 5000
4. You can leave the upper limit blank to use the default upper limit as shown below:
This specifies the destination IP address as a range from 10.141.12.34 to 10.141.12.40
Lock Ldirectord Configuration - Prevent the WebUI from writing the Ldirectord configuration file, so that manual
changes are retained. Manual changes to the Ldirectord configuration file may be overwritten if settings are
edited in the WebUI. Locking the configuration file will prevent the WebUI from modifying the file so that custom
edits are preserved. A warning message will be displayed on all Layer 4 configuration pages, and changes will be
denied.
Check Interval - Layer 4 health check interval in seconds. If this setting is too low, you may experience
unexpected Real Server downtime.
TCP FIN Timeout - The time to remember an TCP session for after seeing a FIN packet.
UDP Timeout - The time to remember a session for after seeing a UDP packet. The timeout is reset on every UDP
packet received.
Negotiate Timeout - Layer 4 negotiate health check timeout in seconds. The negotiate checks may take longer to
process as they involve more server side processing than a simple TCP socket connect check. If this setting is
too low, you may induce unexpected Real Server downtime.
Failure Count - Layer 4 number of times a check has to fail before taking server offline. The time to detect a
failure and take down a server will be (check interval + check timeout) x failure count.
Quiescent - When a Real Server fails a health check, do we kill all connections?
When Quiescent is set to yes, on a health check failure the Real Server is not removed from the load balancing
table, but the weight is set to 0. Persistent connections will continue to be routed to the failed server, but no new
connections will be accepted. When Quiescent is set to no, the server is completely removed from the load
balancing table on a health check failure. Persistent connections will be broken and sent to a different Real
Server.
Quiescent only applies to health checks - it has no effect on taking Real Servers offline in System
Overview. To manually force a Real Server to be removed from the table, set Quiescent to no
and arrange for the server to fail its health check. This may be done, for example, by shutting
down the daemon or service, changing the negotiate check value, or shutting down the server.
Email Alert Source Address - Specify the global source address of the email alerts. When an email alert is sent,
the system will use this address in the "From" field.
Email Alert Destination Address - Specify the global destination email alert address. This address is used to send
notifications of Real Server health check failures. This can also be configured on a Virtual Service level.
Auto-NAT - Automatically NAT outbound network connections from internal servers. By default servers behind
the load balancer in a NAT configuration will not have access to the outside network. However, clients on the
outside will be able to access load balanced services. By enabling Auto-NAT the internal servers will have their
requests automatically mapped to the load balancer’s external IP address. The default configuration is to map all
requests originating from internal network eth0 to the external IP on eth1. If you are using a different interface for
external traffic you can select it here. Manual SNAT and DNAT configurations for individual servers can also be
configured in the firewall script.
Multi-threaded - Perform health checks with multiple threads. Using multiple-threads for health checks will
increase performance when you have a large number of Virtual Services.
Layer 7 Services
The Basics
Since HAProxy is a full proxy, Layer 7 services are not transparent by default, i.e. the client source IP address is
lost as requests pass through the load balancer and instead are replaced by an IP address owned by the load
balancer. This is the interface IP by default, but can also be set to any other IP address that the load balancer
owns, for example the VIP address.
When a VIP is added, the load balancer automatically adds a corresponding floating IP address which is activated
instantly. You can use the WebUI option: View Configuration > Network Configuration to ensure that the floating
IP address is active. It will be listed as a secondary address/alias.
Multiple persistence methods (aka affinity/stickiness) are supported and can be enabled when needed.
Multiple ports can be specified, for example 80 & 443. In this case persistence will probably be required (default
setting) to ensure that clients hit the same backend server for both HTTP & HTTPS traffic and also prevent the
client having to renegotiate the SSL connection.
Manual configuration of layer 7 services is supported using the WebUI menu option: Cluster Configuration > Layer
7 - Manual Configuration. This enables custom layer 7 VIPs to be created that are able to use HAProxy features
not directly supported via the WebUI. For more information, please refer to Layer 7 - Custom Configurations.
It’s not possible to configure a VIP on the same IP address as any of the network interfaces.
This ensures services can "float" (move) between Primary and Secondary appliances when
using an HA Pair.
1. Using the WebUI, naviagate to: Cluster Configuration > Setup Wizard and click General Layer 7 Virtual
Service.
2. Configure the required Virtual Service settings as shown in the example below:
4. Now continue and add the associated load balanced servers (Real Servers) as shown below:
Use the Add Real Server button to configure additional Real Servers and use the red cross to delete
Real Servers.
Once you’re happy, click Attach Real Servers to create the Real Servers.
A confirmation message will be displayed as shown in the example below:
6. Finally, reload HAProxy using the Reload HAProxy button in the "Commit changes" message box at the top
of the screen or by using the WebUI menu option: Maintenance > Restart Services and clicking Reload
HAProxy.
Running the wizard again will permit additional Layer 7 VIPs and associated RIPs to be
configured.
By default, Real Server health checks are set to a TCP port connect. If you need to
configure a more robust check, please refer to Chapter 8 - Real Server Health Monitoring &
Control.
Each Virtual Service can have an unlimited number of Real Servers. Typically you’ll need one Virtual Service for
each distinct cluster (group of load balanced servers). For example, you’d create a VIP for a web cluster, another
for an FTP cluster and a third for a SIP cluster.
For the Virtual Service to listen on all IP addresses configured on the appliance (including
the management address) specify 0.0.0.0 in the IP address field.
5. Enter the required port(s) in the Ports field - separate multiple ports with commas, specify a range with a
hyphen.
Several ports are used by the appliance and therefore cannot be used for Virtual Services.
For full details, please refer to Ports Used by the Appliance.
HTTP Mode - Use the mode if the Virtual Service will handle only HTTP traffic. This allows more
flexibility in the processing of connections. When using persistence types such as HTTP Cookie and
HTTP Application, HTTP mode must be selected. In addition, the HAProxy log will show more
information on the client requests and Real Server responses.
TCP Mode - Use this mode to support all non HTTP traffic such as HTTPS, RPC, RDP, FTP, SIP etc.
HTTP/2 Mode - Use this mode to support HTTP/2.
Select the required SSL Certificate.
If client validation is required, select the relevant CA Certificate.
To configure advanced HTTP/2 settings, click [Advanced].
Configure the required Ciphers to use, the default is:
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-
SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-
SHA256
Configure the remaining Cipher options.
8. Click Update.
9. To configure the Real Servers, please refer to Creating Layer 7 Real Servers (RIPs).
This option copies all Virtual Service settings and the associated Real Servers. Once duplicated,
you’ll need to change either the IP address or port for the new VIP so that it does not clash with
the original.
4. The VIP will be duplicated with a new label, all other settings will be identical.
5. Change the IP Address, Port and any other setting to suit your requirements.
6. Click Update.
Virtual Service [Advanced] > Enabling this option will prevent the HAProxy configuration file being written
Manual for this Virtual Service, leaving the user to configure it via the Layer 7 - Manual
Configuration Configuration page. If the Virtual Service label is the same in the manual
configuration you will be able to see the status of the Virtual Service as well as
control it via the System Overview as you would any other service.
[Advanced] > Enabling this option will prevent the automatic creation of a Frontend in the
Create HAProxy configuration file for this Virtual Service’s Backend. The pool of Real
Backend Only Servers will not be directly accessible to clients via the network but can
instead be made accessible from another Virtual Service by naming this
Virtual Service in a Backend ACL rule.
Protocol [Advanced] > Select how HAProxy should handle HTTP pipelining to client and server. The
HTTP Pipeline options are:
Mode
Keep-alive Both - Enable pipelining from both the client to HAProxy and
(HTTP mode from HAProxy to the server.
only)
Close both client and server - Disable pipelining, always closing
connections to both client and server after the end of the response, and
appending the Connection: close header in both directions.
Keep-alive client, close server - Allow client to negotiate pipelining,
whilst closing the server connection using HTTP.
[Advanced] > Work around Real Servers that do not correctly implement the HTTP
Work around Connection:close option.
broken
Connection:
close
(HTTP mode
only)
[Advanced] > This allows invalid characters in header names to be passed through to the
Accept Invalid backend. If a fix is not immediately available, enable this option. However it
HTTP can hide further application bugs as well as open security breaches and
Requests should only be enabled as a last resort. Ultimately fix your application.
(HTTP mode
only)
[Advanced] > Enabling this option helps protect against Slowloris type attacks. With this
HTTP request option enabled the client must send the full HTTP header request within 5
timeout (DoS Seconds.
Protection)
(HTTP mode
only)
[Advanced] > It’s possible to reuse idle connections to serve requests from the same
Reuse Idle session which can be beneficial in terms of performance. It’s important to
HTTP note that the first request of a session is always sent over its own connection,
Connections and only subsequent requests may be dispatched over other existing
connections.
(HTTP mode
only)
[Advanced] > Enables the transmission of TCP keep-alive on both the client and the server
TCP Keep-alive sides of the connection. It’s important to note that this has nothing to do with
HTTP keep-alive. This Option is enabled by default when using persistence
(TCP mode modes - MS Session Broker and RDP Client Cookie.
only)
[Advanced] > If a real server becomes un-responsive ignore persistence and send client
Redispatch connection to another available real server. If Unsure leave enabled.
Connection Balance Mode The scheduler used to specify server rotation. Specify the scheduler to utilize
Distribution when deciding the backend server to use for the next new connection. The
Method options are:
Weighted Round Robin - Incoming requests are distributed to Real
Servers in a sequential manner relative to each Real Server’s weight.
Servers with a higher weight receive more requests. A server with a
weight of 200 will receive 4 times the number of requests than a server
with a weight of 50. Weightings are relative, so it makes no difference if
Real Server #1 and #2 have weightings of 50 and 100 respectively or 5
and 10. The default weight for new Real Servers is 100.
Weighted Least Connection (default for new VIPs) - Incoming requests
are distributed to Real Servers with the fewest connections relative to
each Real Server’s weight. Servers with a higher weight receive more
requests. A server with a weight of 200 will receive 4 times the number of
requests than a server with a weight of 50. Again, weightings are relative,
so it makes no difference if Real Server #1 and #2 have weightings of 50
and 100 respectively or 5 and 10. The default weight for new Real
Servers is 100. This is the default method for new VIPs.
First - The first server with available connection slots receives the
connection. The servers are chosen from the lowest numeric identifier to
the highest which defaults to the server’s position in the farm. Once a
server reaches its maxconn value, the next server is used.
Persistence Persistence Select how the load balancer should track clients so as to direct each request
Mode to the same server. The options are:
HTTP Cookie (HTTP mode only) - The load balancer will set an HTTP
Cookie to track each client.
Application Cookie (HTTP mode only) - Where an existing HTTP Cookie
is set by the web application on the Real Servers, use this to track each
client.
SSL Session ID (TCP mode only) - Read the Session ID from the SSL
connection and use this to track each client.
MS Session Broker (TCP mode only) - Use the server-set msts RDP
Cookie to track clients connecting to a Microsoft Terminal Server. The
Session Broker service must be enabled on the real servers.
RDP Client Cookie (TCP mode only) - Use the client-set mstshash RDP
Cookie to track clients connecting to a Microsoft Terminal Server. If the
cookie is missing, source IP persistence will be used instead.
Source IP - The same source IP always hits the same Real Server.
HTTP Cookie and Source IP (HTTP mode only) - As HTTP Cookie, falling
back to Source IP if the cookie is missing from the HTTP request.
X-Forwarded-For and Source IP (HTTP mode only) - Use X-Forwarded-
For, falling back to Source IP if the X-Forwarded-For header is missing
form the request.
Stick On Fallback – This option disables automatically failing back to the
Real Server from the fallback server when the Real Server comes back
online. An external fallback server is required. This method is appropriate
where you have one Real Server and one fallback server. If the Real
Server fails, traffic will be handled by the fallback server. When the Real
Server comes back online, the fallback server will continue to handle all
traffic and no automatic fallback to the Real Server will occur. In order to
force fallback you will need to clear the stick table.
The last successful server is recorded in the stick table and clearing this
will cause the server selection for the next connection to be determined
by the Balance Mode.
None - No persistence. The allocation of clients to Real Servers will be
determined solely by the Balance Mode.
[Advanced] > The time-out period before an idle connection is removed from the connection
Persistence table. The source IP address will be removed from memory when it has been
timeout idle for longer than the persistence timeout. The default units are minutes.
[Advanced] > The size of the table of connections in KB. The size of the table of connections
Persistence (approximately 50 bytes per entry) where connection information is stored to
table size allow a session to return to the same server within the timeout period. The
default units are in KB.
[Advanced] > Clear the stick table entries for a particular real server when that server is
Clear Stick on drained using the system overview. Clearing the associated stick table entries
Drain when draining a real server is particularly useful and recommended if you
have long lived connections with large connection timeouts such as RDP or
SSH. When the server is taken out of drain mode and this option is enabled
users will be load balanced across all servers in the normal way when they
reconnect, when disabled (default) users are reconnected to the same server
until their persistence entry in the stick table expires.
[Advanced] > With XFF headers it’s possible to have either more than one header or more
XFF IP Position than one IP in that header. This option gives the user the ability to select a
specific IP position inside the header to use for persistence. For example: X-
Forwarded-For: 192.168.1.1, 192.168.1.2, 10.10.10.1.
In the above example the -1 (default) position is 10.10.10.1 this will always be
the last appended value, -2 is 192.168.1.2 and -3 is 192.168.1.1 and so on for
as many IPs as you have in your header.
X-Forwarded-For: 192.168.1.1
X-Forwarded-For: 192.168.1.2
X-Forwarded-For: 10.10.10.1
Health Checks Check Type Specify the type of health check to be performed on the Real Servers. The
options are:
Negotiate HTTP/HTTPS (GET) - Scan the page specified in Request to
Send, and check the returned data for the Response Expected string
Negotiate HTTP/HTTPS (HEAD) - Request the page headers of the page
specified in Request to Send
Negotiate HTTP/HTTPS (OPTIONS) - Request the options of the page
specified in Request to Send
Connect to port - Attempt to make a connection to the specified port.
External script - Use a custom file for the health check. For more
information, please refer to External Health Check Scripts.
MySQL - The check consists of sending two MySQL packets, one Client
Authentication packet, and one QUIT packet, to correctly close the
MySQL session. It then parses the MySQL Handshake Initialization
packet and/or Error packet. It’s a basic but useful test and does not
produce error nor aborted connect on the server. However, it requires
adding an authorization in the MySQL table, like this:
No checks, Always on - No health checks, all real servers are marked
online.
ACL Rules Enables ACLs to be configured. For more information on configuring ACLs,
please refer to ACLs (Access Control Lists).
Header Rules Enables HTTP headers to be added, set or deleted. For more information on
(HTTP mode configuring HTTP headers, please refer to Modifying HTTP Header Fields.
only)
Feedback Feedback Select whether HAProxy should query each Real Server for its load level. The
Method Method options are:
None - HAProxy will not modify the Real Server’s weight.
Agent - The Real Server is queried every health check interval for the real
server’s percent CPU idle. This is used to set each Real Server’s weight to
a value proportional to its initial weight. For example, if the initial weight
is 100 and the percentage CPU idle is 34, the weight will be set to 34.
Remember lower numbers mean lower priority for traffic, when
compared with other real servers in the pool.
Fallback Disable Disable fallback server functionality. In the case that all real servers are failing
Server Fallback health checks connections will not be sent to a fallback server, instead TCP
connections will be closed and HTTP requests will be answered with a 503.
IP Address The server to route to if all of the Real Servers fail their health check. By
default the fallback server is set to be the local NGINX instance.
You can also configure the fallback server to be a "hot spare" if required. To do
this, configure the primary server as a Real Server and set the secondary
server as the fallback server.
Port The port of the fallback server. By default this is set to 9081.
[Advanced] > Configure the Fallback server to be persistent. During a health check failure
Fallback users can be forwarded to a fallback server. Setting this to on will make this
Persistence server persistent so that when the Real Servers are put back in the pool, they
will remain on the fallback server until their persistence times out.
When disabled (default), users will be moved to a Real Server when one
becomes available.
SSL Enable Enabling this option will enable by default the use of HTTPS for all new
Backend Backend Servers. This options can then be disabled per backend server under
Encryption the Real Server settings.
Other [Advanced] > Specifies the maximal number of concurrent connections that will be sent to
Maximum this server. If the number of incoming concurrent requests goes higher than
Connections this value, they will be queued, waiting for a connection to be released.
[Advanced] > Use this option to override the default client & server timeouts in the Layer 7
Timeout advanced section.
Client Timeout - The inactivity timeout applies when the client is expected to
acknowledge or send data.
Real Server Timeout - The inactivity timeout applies when the server is
expected to acknowledge or send data.
[Advanced] > Instruct HAProxy to add an X-Forwarded-For (XFF) header to all requests,
Set X- showing the client’s IP Address. If HTTP is selected under Layer 7 Protocol,
Forwarded-For HAProxy is able to process the header of incoming requests. With this option
Header enabled, it will append a new X-Forwarded-For header containing the client’s
IP Address. This information may be extracted by the Real Server for use in
web applications or logging.
[Advanced] > If set to "Yes" any HTTP connections that are made on this VIP will be forced
Force to to reconnect using HTTPS. This will keep any entered URL. If you are
HTTPS terminating the SSL on the Load balancer you should use the same VIP
address for both the SSL Termination and Layer 7 configurations.
301 means "Moved permanently", and a browser may cache the
Location.
302 means "Moved permanently" and means that the browser should not
cache the redirection.
303 is equivalent to 302 except that the browser will fetch the location
with a GET method.
307 is just like 302 but makes it clear that the same method must be
reused.
308 replaces 301 if the same method must be used.
HTTPS Redirect Port - Setting this option to a port other than 443 will cause a
port to be specified in the Force-to-HTTPS redirection emitted when clients
connect via HTTP.
[Advanced] > When set to "Yes" the Host Header is set to the name allocated to the RIP.
Use RIP name
as Host Header
[Advanced] > Insert the rules to inspect the ClientHello packet for SSL/TLS connections
Force SSL even if the rules are not required for the configuration.
Content
Inspection
[Advanced] > If you wish to use this VIP with STunnel for SSL off-load or another supported
Accept Proxy proxy such as Amazons ELB whilst passing the client’s IP address to the real
Protocol servers this option needs to be enabled (checked). If using with STunnel
please ensure that Enable Proxy Protocol is enabled in your STunnel VIP.
[Advanced] > Enable Proxy Protocol to the backend servers. This option allows the back end
Send Proxy servers to see the client’s IP address. It should only be enabled if your server
Protocol supports Proxy Protocol and is configured to use it. The options are:
Send V1 - This uses the first version of the Proxy Protocol and send the
headers in a human readable format.
Send V2 - This is the newer version of the Protocol and sends the
headers in binary.
Send V2 SSL - This is used to show the client was connected over
SSL/TLS.
Send V2 SSL CN - This is the same as V2 SSL but also provides the
Common Name from the client certificate if set.
[Advanced] > Enable gzip HTTP compression. The following MIME types will be
Enable compressed when this is enabled: text/html , text/plain , text/css , text/xml ,
Compression text/javascript , application/javascript , application/xml
[Advanced] > Allows the setting of the source IP address that your backend server will see
Set Source the traffic coming from. This is useful when you wish to only allow a known IP
Address Address to access your Real Servers or need to allow access through a public
gateway.
[Advanced] > HSTS specifies a period of time during which the users browser (agent)
Enable HSTS should only access the server in a secure fashion. The recommended duration
should be three months or more.
[Advanced] > Timeout for the websocket protocol tunnel when no data is passed between
Tunnel client and server. Can be specified as s/m/h for seconds/minutes/hours.
Timeout
[Advanced] > This will set the source address of the data stream leaving the load balancer
Transparent destined for the real server to be that of the client. As a result you will need to
Proxy set the default gateway for the real servers to be that of the load balancer.
Other wise, depending on the source address the return traffic will route round
the load balancer and no responses will be received. Note: Enabling this
feature will enable the TProxy system. Once enabled if no longer required it
will need to be disabled from: Layer7 - Advanced Configuration > Transparent
Proxy.
If you require a custom gateway for a particular VIP, this can be achieved using Policy Based
Routing. For more information, please refer to Policy Based Routing (PBR).
Select the desired ACL type from the Type dropdown list, fill in the details as appropriate, and create the ACL by
clicking the Ok button.
Different types of ACLs can be created. Some ACLs are dependent on information from the application layer and
so are only available for HTTP mode virtual services. The ACL types and their supported modes are listed below.
path
path_beg
path_end
hdr
hdr_host
hdr_beg(Host)
Query
SNI
Flags
IP Address
Port
Free Type
URL-Based ACLs
path:
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: String to compare the full URL path to, e.g. static/page.html.
Action: Action to perform if condition is met. See ACL Actions.
path_reg:
Match against a regular expression (regex).
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: Regex to match, e.g. ^\/blog[^\/]*$ - match if the trailing slash after "blog" is missing.
Action: Action to perform if condition is met. See ACL Actions.
path_beg:
Match against the beginning of the request’s URL path.
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: String to compare the beginning of the URL path to, e.g. /static/ or /level_1/level_2/.
Action: Action to perform if condition is met. See ACL Actions.
path_end:
Match against the end of the request’s URL path.
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: String to compare the end of the URL path to, e.g. /page.html or .png.
Action: Action to perform if condition is met. See ACL Actions.
Header/Param: Name of the query string parameter to match against, e.g. fruit.
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: String to compare the specified query string parameter to, e.g. pineapple.
Action: Action to perform if condition is met. See ACL Actions.
Header-Based ACLs
Match against the request’s full Host header.
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: String to compare the full Host header to, e.g. www.example.com or en.wikipedia.org.
Action: Action to perform if condition is met. See ACL Actions.
hdr_beg(host):
Match against the beginning of the request’s Host header.
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
Action: Action to perform if condition is met. See ACL Actions.
hdr:
Match against a specified request header.
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: String to compare the specified request header to, e.g. application/json.
Action: Action to perform if condition is met. See ACL Actions.
Match against the source IP address of the request.
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: IP address to compare the request’s source IP address to. CIDR notation can be used and
multiple comma-separated values can be given, e.g. 10.0.0.0/8 123.45.67.8.
Action: Action to perform if condition is met. See ACL Actions.
Match against the destination TCP port of the request.
Bool:
Equals: Perform action if URL/Text value matches.
Not equal: Perform action if URL/Text value does not match.
URL/Text: Integer to compare the request’s destination TCP port to.
Action: Action to perform if condition is met. See ACL Actions.
Miscellaneous ACLs
SNI:
Match against the Server Name Indication (SNI) TLS extension field of the request.
Bool:
Not equal: Perform action if URL/Text value does not match.
Action: Action to perform if condition is met. See ACL Actions.
Flags:
Match based on the status of flags set by other ACL rules.
Bool:
Equals: Perform action if condition described by URL/Text field evaluates to true.
Not equal: Perform action if condition described by URL/Text field does not evaluate to true.
Action: Action to perform if condition is met. See ACL Actions.
See ACL Examples for an example of how to use the flags feature.
Free Type:
Free-form custom ACL rule(s) to write into the HAProxy configuration verbatim.
Freetype: ACL configuration line(s) to write into the HAProxy configuration file.
Multiple ACLs can be defined in a single block. Enter one ACL per line.
Full and detailed documentation on how to write ACLs can be found in the HAProxy
Configuration Manual, here.
ACL Actions
When an ACL rule matches an action is taken (or, alternatively, an action is taken when the rule doesn’t match,
depending on the "bool" setting of the rule). Some actions are dependent on information from the application
layer and so are only available for HTTP mode virtual services. The different actions and their supported modes
are listed below.
Drop
Deny
Set Flag
URL Location
URL Prefix
Use Backend
Use Server
Drop (aka reject): Stop and immediately close the connection without sending a response.
Deny: Stop and immediately deny the request, emitting the chosen HTTP status code as a response.
Status code: Status code to use as a response.
200 OK
400 Bad Request
403 Forbidden
405 Method Not Allowed
408 Request Timeout
425 Too Early
429 Too Many Requests
500 Internal Server Error
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout
Set Flag: Set a flag for use in subsequent ACL rules of type "Flag".
URL Location (aka redirect location): Redirect the request to the exact location specified, using a 301 Moved
Permanently status code.
Location/Value: Exact location to redirect to, e.g.
https://en.wikipedia.org/wiki/User_Datagram_Protocol.
URL Prefix (aka redirect prefix): Redirect the request to the URL path originally requested prefixed with a
specified string, using a 301 Moved Permanently status code.
Location/Value: String to prefix to the requested URL path to create the redirect location, e.g.
https://www.example.com.
Use Backend: Use the specified backend, or another virtual service, to handle the request.
Location/Value: Name of a valid backend, or another virtual service, to use, e.g.
apache_srv_cluster_b.
Use Server: Use the specified server to handle the request.
Location/Value: Name of a valid real server, in the same virtual service or backend, to use, e.g.
apache_srv_7.
A virtual service occasionally sees requests for a retired domain, www.foo.com. These requests need to be
redirected to the new domain: www.bar.com. For example, a request for
https://www.foo.com/static/diagram.svg must be redirected to
https://www.bar.com/static/diagram.svg.
Example 2
A web service has been moved: previously, all of its resources were located under /web-service/, but now
everything is located under /legacy/web-service/. Any requests for old locations, whose paths start with
just web-service, must be redirected to the correct new locations.
Example 3
A web service hosts an administration panel which is located under /admin/. The only legitimate use of this
panel should be from users on the local network, which is 10.0.0.0/8. Any non-local users attempting to access
the administration panel should be redirected to a branded page, located at
https://example.com/restricted.html, which explains that they have attempted to access a restricted
part of the service.
First ACL action to use: Set Flag, setting the flag is_admin_panel.
Second ACL type to use: IP Address, matching against the network 10.0.0.0/8.
Second ACL action to use: Set Flag, setting the flag is_local_user.
Third ACL action to use: URL Location, with the location https://example.com/restricted.html.
The two flag names together, is_admin_panel !is_local_user, create a logical AND (a logical OR could be
achieved, instead, by explicitly placing || between the flag names). The exclamation mark negates the match on
is_local_user. The resulting expression of the third ACL will match, and cause the redirection action to be
The ACL that evaluates the two flags must be placed after the two ACLs that set the flags.
Example 4
It’s necessary to force the use of a particular real server in some scenarios. This must be achieved by setting a
particular query string parameter to the name of the server. For example,
http://192.168.0.10/?server_override=apache_srv_dev should trigger the override ACL condition
and send the request to the special server.
ACL type to use: Query, looking for the server_override parameter and matching against apache_srv_dev.
ACL action to use: Use Server, with the server name apache_srv_dev.
Example 5
You have the following VIPs, both with source IP persistence enabled:
VIP1 that listens on 192.168.10.10:80 and forwards traffic to the Real Servers on port 8080
VIP2 that listens on 192.168.10.10:443 and forwards traffic to the same Real Servers on port 4443
You want all requests from a particular client to be handled by the same Real Server irrespective of which VIP
receives the request. You can’t group port 80 and 443 into a single VIP because port translation is used. To
achieve the same objective, both VIPs are configured to share the same persistence table.
Configuration steps:
type to use: Free Type
value: stick on src table VIP1
HAProxy Backends
When an ACL is created and the Action is set to Use Backend it’s possible to set the Location/Value field to either
a backend only VIP, a standard VIP or a manually defined VIP.
A Backend VIP does not have a frontend in the HAProxy configuration, only a backend. As a result, there is no
floating IP address associated with the VIP. This kind of VIP is used exclusively for ACLs where access is only
needed from another VIP and not directly from clients over the network.
3. Click [Advanced] and enable (check) the Create Backend Only checkbox.
6. Click Update.
8. Click the Add a New Real Server button next to the newly created VIP.
You can modify the Backend Virtual Service in the normal way if additional settings must be
configured.
Manually defined backends allow additional custom settings that are not directly supported via the WebUI to be
configured.
Using the WebUI menu option: Cluster Configuration > Layer 7 - Manual Configuration, the backend "Blog" can be
defined as shown below:
backend Blog
mode http
balance roundrobin
option forwardfor
server rip3 192.168.110.242:80 weight 1 check
server rip4 192.168.110.243:80 weight 1 check
Standard VIPs can also be used. Here, "Blog" has been defined as an additional standard VIP with two Real
Servers:
For more details on configuring ACLs please also refer to the HAProxy online documentation
available here.
Example 1
Example 2
Example 3
Replace /jpg/ with /images/ while maintaining the components before and after the folder.
HAProxy uses PCRE compatible regular expressions. For more information about PCRE syntax,
see Regex Quick Start and Regex Cheat Sheet.
The "reqrep" keyword is strictly case-sensitive, while "repirep" is case insensitive. For more
details on configuring manually defined layer 7 VIPs, please refer to Configuring Manual Virtual
Services.
Select the desired header type from the Type dropdown list, fill in the details as appropriate, and create the header
rule by clicking the Ok button.
A header rule can be modified by clicking on it in the header rules list. Header rules can be reordered by clicking
and dragging them in the header rules list:
Response: Affect specified HTTP header fields in HTTP response messages.
Option Description
Add Append an HTTP header field. If a header field of the same name already exists then an
additional header field will still be appended.
Set Append an HTTP header field. If a header field of the same name already exists then it is
first removed before a new one is appended. This is useful for handling security
information which external users must not be able to set themselves.
Replace Perform a regular expression powered "find and replace" operation on all HTTP header
field values of a specified name.
Add:
Header: Field name of the HTTP header to append.
Value: Field value of the HTTP header to append.
Flags (optional): Conditionally execute the header manipulation rule based on the status of flags set by ACL
rules, e.g. is_external_request.
Set:
Header: Field name of the HTTP header to append.
Value: Field value of the HTTP header to append.
Flags (optional): Conditionally execute the header manipulation rule based on the status of flags set by ACL
rules, e.g. is_external_request.
Delete:
Header: Field name of the HTTP header to delete.
Flags (optional): Conditionally execute the header manipulation rule based on the status of flags set by ACL
rules, e.g. is_external_request.
Replace:
Header: Field name of the HTTP header to replace.
<replacement>.
See HTTP Header Field Modification Examples for an example of how to use the replace option.
It’s possible to include dynamic information in header fields, for example the IP address of a
request. This is achieved by using log format variables, e.g. %ci for the client IP address, and
sample expressions, e.g. %[fe_name] for the name of the virtual service handling the request.
This functionality is explained in detail in the HAProxy online documentation: the relevant section
can be found here.
A secure deployment requires that the X-Forwarded-For header field in client requests never be trusted. The
header is under the control of the client and could potentially contain misinformation set by a malicious client. All
header fields of this name should be deleted from incoming requests.
Example 2
A poorly designed web service behind the load balancer leaks sensitive information through an HTTP response
header field. The vulnerable response field looks like so: Database-Engine: MongoDB_3.4.14. All header
fields of this name should be deleted from outgoing responses.
Example 3
A web service behind the load balancer expects to receive information about client requests via HTTP header
fields. The service expects to receive the source IP address, destination IP address, and destination port of the
client’s initial connection to the load balancer, which it expects to find in header fields named X-Client-Source, X-
Client-Dest, and X-Client-Dest-Port, respectively. The load balancer should add these header fields to incoming
requests and populate their values appropriately. The load balancer should also delete any pre-existing header
fields that use the field names that the web service is logging, to prevent clients from tampering with or injecting
arbitrary data into the web service’s logs.
Example 4
Any requests containing the HTTP header field "Fruit" with a corresponding value of "pineapple" should have this
value changed to "kiwi".
1. Using the WebUI, navigate to: Cluster Configuration > Layer 7 - Real Servers.
2. Click Add a new Real Server next to the relevant Virtual Service.
A valid FQDN can be used rather than an IP address if required. The name is resolved
using the DNS server(s) specified in Local Configuration > Hostname & DNS.
For more details about this option, please refer to SSL Termination on the Load Balancer
with Re-encryption (SSL Bridging) and Mutual Transport Layer Security (mTLS).
7. If required, enable the Enable Redirect option. When enabled, this option allows a particular Real Server to
respond to GET or HEAD requests with a redirect to a specified location. Requests will be redirected to a URL
made up of the prefix specified and the path of their GET or HEAD request. Other request types will continue
to be handled by the Real Server.
This option is only available when the associated VIP’s Layer 7 Protocol is set to HTTP
Mode.
8. Specify the required Weight, this is an integer specifying the capacity of a server relative to the others in the
pool, valid values are 0 to 256, the default is 100. The higher the value, the more connections the server will
receive. If the weight is set to 0, the server will effectively be placed in drain mode.
To configure Minimum Connections and Maximum Connections, modify the Real Server
after it has been created, these options will then be available.
9. Click Update.
Step 1 - Define the VIP in the normal way using the WebUI menu option: Cluster Configuration > Layer 7 -
Virtual Services.
Step 2 - Define the required Real Servers in the normal way using the WebUI menu option: Cluster
Configuration > Layer 7 - Real Servers.
Step 3 - Using the WebUI menu option: View Configuration > Layer 7, scroll down to the newly created VIP
and copy the whole configuration section for the VIP - from the initial Listen <VIP name> line, right to the end
of the Real Server definitions.
Step 4 - Click Modify next to the newly created VIP, then click [Advanced] in the Virtual Service section.
Enable (check) the Manual Configuration checkbox and click Update.
Step 5 - Navigate to: Cluster Configuration > Layer 7 - Manual Configuration and paste the configuration
copied in Step 3 into the editor window, then add the additional custom configuration settings for the VIP
and click Update when complete.
When you click update in step 5, a syntax check will be done to ensure that the lines you
have added are valid.
This example is for demonstration purposes only. Complex ACLs can be configured in the
WebUI without the need for a manual configuration. For more information on configuring ACLs,
please refer to ACLs (Access Control Lists).
Notes
1. These lines configure two ACLs named ACL-1 & ACL-2 where the criteria for a match is that the URL starts
with either /staff/ or /staff.
Configuration Steps:
1. Using the WebUI menu option: Cluster Configuration > Layer 7 - Virtual Services create a Layer 7 VIP with the
required Label (name), IP Address and Port. At this point leave the Manual Configuration checkbox un-
checked, e.g.
2. Using the WebUI menu option: Cluster Configuration > Layer 7 - Real Servers configure the associated RIPs
in the normal way, e.g.
3. Using the WebUI menu option: View Configuration > Layer 7 scroll down to the newly created VIP. Now copy
the entire configuration for the VIP.
listen VIP1
bind 192.168.2.110:80 transparent
mode http
balance leastconn
cookie SERVERID maxidle 30m maxlife 12h insert nocache indirect
server backup 127.0.0.1:9081 backup non-stick
option http-keep-alive
timeout http-request 5s
option forwardfor
timeout tunnel 1h
option redispatch
4. Using the WebUI menu option: Cluster Configuration > Layer 7 - Virtual Services, modify the VIP and check
the Manual Configuration checkbox and click Update.
5. Select the WebUI menu option: Cluster Configuration > Layer 7 - Manual Configuration and paste the VIP’s
configuration into the editor window, then add the extra manual config lines:
listen VIP1
bind 192.168.2.110:80 transparent
mode http
balance leastconn
acl ACL-1 path_beg /staff/
acl ACL-2 path_beg /staff
redirect location https://login.domain.com if ACL-1 or ACL-2
cookie SERVERID maxidle 30m maxlife 12h insert nocache indirect
server backup 127.0.0.1:9081 backup non-stick
option http-keep-alive
timeout http-request 5s
option forwardfor
timeout tunnel 1h
option redispatch
option abortonclose
maxconn 40000
option httplog
server RIP1 192.168.2.111:80 weight 100 cookie Rip1 check inter 4000 rise 2 fall 2 slowstart
8000 minconn 0 maxconn 0 on-marked-down shutdown-sessions
server RIP2 192.168.2.112:80 weight 100 cookie Rip1 check inter 4000 rise 2 fall 2 slowstart
8000 minconn 0 maxconn 0 on-marked-down shutdown-sessions
6. Click Update.
7. Now reload HAProxy using the Reload HAProxy button in the "Commit changes" message box at the top of
the screen.
Transparency at Layer 7
HAProxy, Pound and STunnel are all proxies which means that a new connection is established from the proxy
out to the backend server in response to an inbound client connection to the proxy. This means that the source IP
address of the packet reaching the Real Servers will not be the client’s IP address, but an IP address owned by the
load balancer. The source IP address applied depends on which proxy is in operation:
HAProxy - By default the IP address of the network interface is used, but this can also be configured to be any IP
address that the load balancer owns using the Set Source Address field of the Layer 7 VIP.
STunnel - By default the IP address of the STunnel Virtual Service is used, but this can also be configured to be
any IP address that the load balancer owns using the Set Source Address field of the STunnel VIP.
Enabling Transparency
The load balancer can provide the actual client IP address to the Real Servers in two ways:
1. By inserting a header that contains the client IP source address. For HTTP traffic the X-Forwarded-For (XFF)
header is used, for TCP traffic the Proxy Protocol Header is used.
For more information on XFF headers, please refer to Mozilla - X-Forwarded-For, for more
information on Proxy Protocol headers, please refer to HAProxy Technologies - The PROXY
Protocol.
2. By modifying the Source Address field of the IP packets and replacing the IP address of the load balancer
with the IP address of the client. The load balancer uses TProxy for this purpose.
In many cases, option 1 (using headers) can be used to achieve your objectives. Option 1
is easier to implement because there are no network topology requirements.
These methods can be used independently or in combination to achieve a range of objectives as illustrated in the
Configuration Examples section.
Inserting Headers
X-Forwarded-For (XFF) Headers
X-Forward-For headers are inserted by HAProxy when the layer 7 VIP option Set X-Forwarded-For header is
enabled (the default for new layer 7 VIPs). A new X-Forwarded-For header is appended by the load balancer
containing the client’s IP address. This information can then be extracted by the Real Servers for use in web
applications or logging.
STunnel - To configure STunnel to send Proxy Protocol Headers, the STunnel Virtual Service option Enable Proxy
Protocol must be enabled.
If Associated Virtual Service is set when configuring the STunnel Virtual Service Enable Proxy
Protocol will be enabled by default and cannot be disabled.
HAProxy - To configure HAProxy to send Proxy Protocol Headers, the layer 7 Virtual Service dropdown Send
Proxy Protocol must be set to the required header version/type.
To configure HAProxy to receive Proxy Protocol Headers, two methods can be used:
1. By specifying the Layer 7 Virtual Service where the STunnel VIP will forward its connections when creating /
modifying the STunnel Virtual Service. This will also automatically configure the layer 7 VIP to expect Proxy
Protocol Headers only for connections from the STunnel VIP where the option was enabled. In this way, the
layer 7 VIP will accept traffic with Proxy Protocol Headers from the STunnel VIP as well as standard traffic
Click Modify next to the STunnel VIP.
Set the Associated Virtual Service dropdown to the relevant Layer 7 VIP.
Click Update.
2. By enabling the layer 7 Virtual Service option Accept Proxy Protocol - this will configure the layer 7 VIP to
expect Proxy Protocol Headers for all connections. With this method, the layer 7 VIP will only accept
connections from sources that present Proxy Protocol Headers. To configure this method:
Click Modify next to the HAProxy VIP.
Scroll down to the Other section and click [Advanced].
Enable (check) Accept Proxy Protocol.
Click Update.
Here, the VIP is brought up in the same subnet as the Real Servers.
To support remote clients, the default gateway on the Real Servers must be an IP address on the load
balancer and routing on the load balancer must be configured so that return traffic is routed back via the
router.
For an HA clustered pair, a floating IP should be added to the load balancer and used as the Real
Server’s default gateway. This ensures that the IP address can "float" (move) between Primary
and Secondary appliances.
To support local clients, return traffic would normally be sent directly to the client bypassing the load
balancer which would break TProxy. To address this, the routing table on the Real Servers must be modified
to force return traffic to go via the load balancer in the same way as one-arm NAT mode. For more
information, please refer to One-Arm (Single Subnet) NAT Mode.
This can be achieved by using two network adapters, or by creating VLANs on a single adapter.
The default gateway on the Real Servers must be an IP address on the load balancer.
For an HA clustered pair, a floating IP should be added to the load balancer and used as the Real
Server’s default gateway. This ensures that the IP address can "float" (move) between Primary
and Secondary appliances.
Clients can be located in the same subnet as the VIP or any remote subnet provided they can route to the
VIP.
Click Modify next to the HAProxy VIP.
Scroll down to the Other section and click [Advanced].
Enable (check) Transparent Proxy.
Click Update.
Configuration Examples
Example 1 - Using Proxy Protocol & X-Forwarded-For Headers
In this example, Proxy Protocol Headers are used with STunnel and HAProxy to present the original client source
IP address to the load balanced servers in an XFF header inserted by HAProxy.
HAProxy can also be used to perform SSL termination. In this case, STunnel and Proxy Protocol
Headers are not needed. For more information on using HAProxy for SSL termination, please
refer to SSL Termination on the Load Balancer (SSL Offloading).
1. Configure the STunnel VIP and the HAProxy VIP on the same IP address. Clients then connect to a single IP
address for HTTP and HTTPS.
2. Proxy Protocol must be enabled via the STunnel VIP, not via the Layer 7 (HAProxy) VIP. In this way, the
HAProxy VIP where STunnel forwards its traffic is automatically configured to accept traffic with Proxy
Protocol Headers from the STunnel VIP, and also standard traffic without Proxy Protocol Headers from other
sources, i.e. the direct HTTP connections.
The STunnel VIP option Associated Virtual Service must be set to the backend HAProxy VIP where STunnel will
forward its traffic. Then, both the STunnel VIP and the associated HAProxy VIP will be configured automatically.
2. Configure the HAProxy VIP to expect Proxy Protocol Headers only from traffic that comes from the STunnel
VIP.
X-Forwarded-For Headers must be enabled for HAProxy (this is the default setting).
Once all settings are configured, the X-Forwarded-For header received by the load balanced servers Web 1 & Web
2 will contain the source IP address of the client.
1. Certain topology requirements must be met when using TProxy. For details, please refer to Using TProxy to
modify the Source IP Address.
2. TProxy for HAProxy must be enabled. This is done at the VIP level rather than globally as in previous
versions. To enable TProxy at the VIP level, click Modify next to the VIP in question, scroll down to the Other
section and click [Advanced], then enable (check) Transparent Proxy.
3. On the Real Servers, the default gateway must be configured to be an IP address on the load balancer. When
using a clustered pair, this should be a floating IP to allow failover to the Secondary.
1. Certain topology requirements must be met when using TProxy. For details, please refer to Using TProxy to
modify the Source IP Address.
2. Configure the STunnel VIP and the HAProxy VIP on the same IP address. Clients then connect to a single IP
address for HTTP and HTTPS.
3. TProxy for HAProxy must be enabled. This is done at the VIP level rather than globally as in previous
versions. To enable TProxy at the VIP level, click Modify next to the VIP in question, scroll down to the Other
section and click [Advanced], then enable (check) Transparent Proxy.
4. On the Real Servers, the default gateway must be configured to be an IP address on the load balancer. When
using a clustered pair, this should be a floating IP to allow failover to the Secondary.
5. Proxy Protocol must be enabled via the STunnel VIP, not via the Layer 7 (HAProxy) VIP. This is done by
checking the Enable Proxy Protocol option when either creating or modifying the STunnel VIP (please refer to
configuration example 1). This automatically configures the HAProxy VIP to accept traffic with Proxy
Protocol Headers from the STunnel VIP and also standard traffic from other sources (i.e. the direct HTTP
connections) that do not present Proxy Protocol Headers.
6. If you want to enable HTTP to HTTPS redirection, enable Force to HTTPS on VIP1.
1. Certain topology requirements must be met when using TProxy. For details, please refer to Using TProxy to
modify the Source IP Address.
2. Configure the Pound VIP and the HAProxy VIP on the same IP address. Clients then connect to a single IP
address for HTTP and HTTPS.
3. Configure the Layer 7 HAProxy VIP to listen on two ports - e.g. 80 & 81, then use port 80 for client
connections on HTTP and port 81 for the Pound backend.
4. When configuring Real Servers for HAProxy VIP, ensure that the Real Server Port field is set and not left
blank.
5. TProxy for HAProxy must be enabled. This is done at the VIP level rather than globally as in previous
versions. To enable TProxy at the VIP level, click Modify next to the VIP in question, scroll down to the Other
section and click [Advanced], then enable (check) Transparent Proxy.
6. TProxy for Pound must be enabled using the WebUI menu option: Cluster Configuration > SSL - Advanced
Configuration and Transparent Proxy to On.
7. On the load balanced backend Servers, the default gateway must be configured to be an IP address on the
load balancer. When using a clustered pair, this should be a floating IP to allow failover to the Secondary
appliance.
8. If you want to enable HTTP to HTTPS redirection, you’ll need to split the Layer 7 HAProxy VIP into two
separate VIPs, one on port 80 with Force to HTTPS enabled and the other configured to accept traffic from
Pound.
Lock HAProxy Configuration (Deprecated) - Prevent the WebUI writing to the HAProxy configuration file. Manual
changes to the HAProxy configuration file may be overwritten if settings are edited in the WebUI. Locking the
configuration file will prevent the WebUI from modifying the file, so that custom edits are preserved. A warning
message will be displayed on all Layer 7 configuration pages, and changes will be denied.
Logging - Set the required logging level for layer 7 services. Logs are written to /var/log/haproxy.log.
Redispatch - Allows HAProxy to break persistence and redistribute to working servers should failure occur.
Normally this setting should not require changing.
Connection Timeout - HAProxy connection timeout in milliseconds. This setting should normally not require
changing.
Client Timeout - HAProxy client timeout in milliseconds. This setting should normally not require changing.
Real Server Timeout - HAProxy Real Server timeout in milliseconds. This setting should not require changing.
Maximum Connections - HAProxy maximum concurrent connections. This setting should not require changing,
unless you are running a high volume site. See also Maximum Connections for a Virtual Service (HAProxy).
Abort on Close - Abort connections when users close their connection. Recommended as the probability for a
closed input channel to represent a user hitting the browser’s "stop" button is close to 100%.
Transparent Proxy - Enable TProxy support for Layer 7 HAProxy. TProxy support is required in order for the Real
Servers behind a layer 7 HAProxy configuration to see the client source IP address. The load balancer must be in
a NAT configuration (internal and external subnets) with the Real Servers using an IP address on the load
balancer (preferably a floating IP) as their default gateway. Can be used on its own or in combination with Pound
and TProxy.
TProxy must be enabled at the VIP level. This is a change from previous versions where enabling
it here would enable it for ALL layer 7 VIPs. To enable TProxy at the VIP level, click Modify next to
the VIP in question, scroll down to the Other section and click [Advanced], then enable (check)
Transparent Proxy. Setting this at the VIP level will also automatically set the Transparent Proxy
option here. For more information on using TProxy, please refer to Transparency at Layer 7.
Since the load balancer must be in a NAT configuration (i.e. VIPs & RIPs in different subnets and
default gateway on the Real Servers set as an IP on the load balancer) to utilize TProxy, it’s not
always an appropriate solution. In situations such as this, it’s also possible to use the X-
forwarded-for header with layer 7 Virtual Services. Most web servers can then be configured to
record the X-Forwarded-For IP address in the log files.
For details on how to enable X-Forwarded-For headers, please click here. For details on how to
enable X-Forwarded-For headers in Apache, please refer to our Apache blog, For details on how
to enable X-Forwarded-For headers in IIS, please refer to our IIS blog.
Disable On Start - HAProxy brings up all real servers in the UP state after the restart. Enabling this option will
bring the real servers up in MAINT mode stopping any connections to them. The init script will then return the real
servers back to their previous state pre reload/restart. The init script can do this without this option enabled but
while waiting for the init script to get to each service to set the state the real server will be accepting traffic. So it’s
Interval - Interval between health checks. This is the time interval between Real Server health checks in
milliseconds.
Rise - Number of health checks to Rise. The number of positive health checks required before re-activating a Real
Server.
Fall - Number of health checks to Fall. The number of negative health checks required before deactivating a Real
Server.
Slow Start Time - To minimize the thundering heard effect of a real server recovering from a health check failure
getting overwhelmed with all its old users attempting to reconnect at once. This timer will gradually increase the
connections for a period set by this value until the end of the timer is reached at which point the server will be
running at normal capacity.
If the feed back agent is enabled, the slowstart time MUST be greater than the Interval value.
Feedback Agent Interval - The time in milliseconds between each feedback agent check from HAProxy to the
feedback agent.
Advanced Stats - Enable/disable additional actions available on the HAProxy stats page.
Auto-refresh Stats Page - Enable to allow the layer 7 stats page to refresh periodically. Automatic refreshing can
be paused and resumed using Disable refresh and Enable refresh in the Display options on the stats page.
Auto-refresh Interval - Enter the time to wait before refreshing after the statis page is loaded. A suffix of us, ms, s,
m, h or day can be added to specify microseconds, milliseconds, seconds, minutes, hours or days respectively.
The default unit is seconds.
Request Buffer Length - Set the health check buffer length in bytes.
Changing this value will effect the performance of HAProxy. Do not make changes unless you
know exactly what you are doing.
Lower values allow more sessions to coexist in the same amount of RAM, and higher values allow some
applications with very large cookies to work. The default value is 16384 bytes. It is strongly recommended not to
change this from the default value, as very low values will break some services such as statistics, and values
larger than the default size will increase memory usage, possibly causing the system to run out of memory.
Administrators should consider reducing the Maximum Connections parameter if the request buffer is increased.
Header Buffer Length - Set the header buffer length, in bytes The header buffer is a section of the request buffer,
reserved for the addition and rewriting of request headers. The default value is 1024 bytes. Most applications will
only require a small header buffer, as few headers are added or rewritten.
Persistence Table Replication - When enabled, HAProxy’s persistence tables are replicated to the Secondary
Replication Port - Set the TCP port to use for persistence table replication. The default port is TCP 7778.
eMail Alert From - Set the "from address" for email alerts.
eMail Server Address - Set the email server address as either an IP address or FQDN.
For more information on configuring email alerts, please refer to Configuring Email Alerts for
Virtual Services.
Enable Multi-threading - This can improve performance if limits are being reached.
Default Number of Threads - Let the appliance choose a sensible number of worker threads. By default this will
be be the same as the number of cores available when HAProxy starts or reloads.
Number of Threads - Be aware that starting too many threads will have a detrimental affect on performance.
Leaving this field blank will have the same effect as selecting default number of threads.
Multi-threading is enabled by default and the number of threads is auto set based on the
number of detected CPUs / vCPUs.
Enable Prometheus Exporter - Enable the Prometheus exporter for HAProxy. The end point will be mapped to
/lbadmin/stats/l7prometheus/ in the WebUI.
Code When/Reason
401 when an authentication is required to perform the action (when accessing the stats page)
408 when the request timeout strikes before the request is complete
410 when the requested resource is no longer available and will not be available again
500 when haproxy encounters an unrecoverable internal error, such as a memory allocation failure,
which should never happen
502 when the server returns an empty, invalid or incomplete response, or when an "rspdeny" filter blocks
the response.
503 when no server was available to handle the request, or in response to monitoring requests which
match the "monitor fail" condition
504 when the response timeout strikes before the server responds
For a complete HAProxy reference please refer to the HAProxy Configuration Manual.
Floating IPs
In order for the load balancer to function, the appliance must physically own the Virtual IP address that the clients
are accessing before they get re-directed to a Real Server in the cluster. When new layer 4 or layer 7 Virtual
Services (VIPs) are created, corresponding Floating IPs are added automatically and can be viewed using the
WebUI menu option: Cluster Configuration > Floating IPs.
It’s also possible to manually configure floating IPs if required, this is normally only required when manually
configuring firewall marks or when using layer 4 NAT mode or TProxy where in both cases the load balancer must
be the default gateway for the Real Servers. A floating IP is required for an HA pair to allow the gateway address
to be brought up on the secondary appliance should a failover occur.
Floating IPs are controlled by heartbeat to ensure that only the active appliance (normally the Primary) owns the
Floating IP(s) at any time.
1. Using the WebUI, navigate to: Cluster Configuration > Floating IPs.
When using a clustered pair, ensure that the Secondary also has a static IP address
assigned that’s in the same subnet as the floating IP being added. Failure to do so will
result in heartbeat issues during a failover.
To disable a floating IP address and bring the IP down, use the relevant Disable button.
The Disable button will be replaced with an Enable button to bring it back up when
required.
Floating IPs are not deleted automatically when Virtual Services are removed or the IP
address is changed, this must be done manually.
SSL Termination
Concepts
SSL termination can be handled in the following ways:
3. On the load balancer with re-encryption to the backend servers - aka SSL Bridging.
In this case SSL certificates are installed on each Real Server in the normal way. Data is encrypted from client to
server. This provides full end-to-end data encryption as shown in the diagram above.
Notes
1. This is our recommended solution. SSL termination on the load balancer (SSL Offload) can be very CPU
intensive and in most cases, for a scalable solution, terminating SSL on the Real Servers is the best option.
The load balancer is configured with a VIP that listens on HTTPS port 443 and distributes inbound requests to the
Real Servers on port 443 as shown below:
A fairly common configuration is to include port 80 in the VIP’s definition and also enable persistence. This
ensures that both HTTP and HTTPS requests from a particular client are always sent to the same Real Server as
shown below:
1. By default, a self-signed certificate is used for the new VIP. Certificates can be created or uploaded as
explained in Certificates.
2. The backend for the STunnel / Pound VIP can be a Layer 7 SNAT mode VIP, a Layer 4 NAT mode VIP or a
layer 4 SNAT mode VIP.
3. If a layer 7 SNAT mode VIP is used as the backend for the STunnel or Pound VIP, cookie based persistence
as well as all other layer 7 techniques can be used to control traffic flow to the Real Servers.
Notes
1. By default, a self-signed certificate is used for the new VIP. Certificates can be created or uploaded as
explained in Certificates.
2. Cookie based persistence as well as all other layer 7 techniques can be used to control traffic flow to the
Real Servers.
Certificates
If you already have an SSL certificate in either PFX or PEM file format, this can be uploaded to the Load balancer
using the certificate upload option as explained in Uploading Certificates. Alternatively, you can create a
Certificate Signing Request (CSR) and send this to your CA to create a new certificate, or you can create a locally
signed custom certificate.
To generate a CSR:
1. Using the WebUI, navigate to: Cluster Configuration > SSL Certificates.
2. Click Add a new SSL Certificate & select Create a New SSL Certificate (CSR).
6. To view the CSR click Modify next to the new certificate, then expand the Certificate Signing Request (CSR)
section.
8. Once received, copy/paste your signed certificate into the Your Certificate section.
9. Intermediate and root certificates can be copied/pasted into the Intermediate Certificate and Root Certificate
sections as required.
2. Click Add a new SSL Certificate & select Create a new Self-Signed SSL Certificate.
Uploading Certificates
Certificates in either PEM or PFX formats can be uploaded to the load balancer.
To upload a certificate:
1. Using the WebUI, navigate to: Cluster Configuration > SSL Certificates.
2. Click Add a new SSL Certificate & select Upload prepared PEM/PFX file.
4. Browse to and select the certificate file to upload (PEM or PFX format).
6. Click Upload Certificate, if successful, a message similar to the following will be displayed:
If your Primary & Secondary are correctly configured as a clustered pair, when you upload the
certificate file to the Primary, the file will be automatically copied over to the Secondary
appliance.
SSL certificates are included in the backup archive when a backup is created. For details, please
refer to Backup & Restore.
1. Using the WebUI, navigate to: Cluster Configuration > SSL Certificates.
Private Key
SSL Certificate
Intermediate Certificate
Root CA Certificate
Make sure you include the beginning and end tags. The resulting file should look similar to the following:
openssl x509 -in file.cer -inform DER -out file.pem -outform PEM
If a password has been included in the private key, this should be removed before it is used with your PEM file.
This can be done using the following command:
Let’s Encrypt
Lets Encrypt is a zero cost Certificate Authority for HTTPS encryption, now trusted by all major root programs,
including Google, Microsoft, Apple, Mozilla and Oracle. Used in conjunction with freely available tools it provides
automatic enrollment/renewal, simple cert creation, negating validation emails and manual configuration.
For much more information, please refer to our Let’s encrypt introductory blog and also the follow up blog that
details the lb-letsencrypt.sh script and how to use it.
1. Using the WebUI, navigate to: Cluster Configuration > SSL Termination.
If you leave it set to None:
Enter the required Label (name) for the Virtual Service.
Enter the required Virtual Service IP Address.
Enter the required Virtual Service Port - typically 443.
Enter the required Backend IP Address - This is normally the same IP address as the Virtual
Service IP address but can be any valid IP. The IP address specified must correspond to a Layer 7
SNAT mode VIP or a Layer 4 NAT / SNAT mode VIP. Unencrypted traffic will be sent here for load
balancing.
Enter the required backend Virtual Service Port - typically 80.
Select the required SSL Operation Mode:
High Security - Configure the STunnel VIP for high security
FIPS Compliant - Configure the STunnel VIP for FIPS compliance
High Compatibility - Configure the STunnel VIP for high compatibility
Custom - All settings can be configured manually
Select the required SSL Certificate.
Set the required Source IP Address - by default the Virtual Service IP Address is used but this can
be changed to any other address owned by the load balancer if required.
Configure Enable Proxy Protocol - If you wish to use HAProxy and the Proxy Protocol this option
needs to be enabled (checked) to allow SSL termination on the load balancer whilst passing the
client’s IP address to the Real Servers. This option only enables a Proxy ACL Rule on a Single
STunnel VIP.
Configure Bind Proxy Protocol to L7 VIP - If Enable Proxy Protocol is enabled, selecting a layer 7
Virtual service here configures the layer 7 service to expect the proxy protocol from this STunnel
service. This enables the layer 7 service to pass the client’s IP in a X-Forwarded-For header or with
TProxy while still accepting HTTP traffic on the same port (for more information, please refer to
Transparency at Layer 7). Note that manually defined layer 7 VIPs are not included in the
dropdown.
If you select a particular VIP where you want to forward the unencrypted STunnel traffic:
Enter the required Label (name) for the Virtual Service.
The label will be auto configured based on the Associated Virtual Service
selected. This can be changed if required.
Enter the required Virtual Service Port - typically 443.
Select the required SSL Operation Mode:
High Security - Configure the STunnel VIP for high security
FIPS Compliant - Configure the STunnel VIP for FIPS compliance
High Compatibility - Configure the STunnel VIP for high compatibility
Custom - All settings can be configured manually
Select the required SSL Certificate.
Click Update to create the new STunnel Virtual Service.
Once the SSL Termination is created, the associated VIP will be displayed with a padlock symbol in the system
overview as shown below:
The following SSL Ciphers are auto-configured for each SSL Operation Mode:
High Security
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-
AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256
FIPS Compliant
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-
AES256-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-
AES256-SHA256:AES256-GCM-SHA384:AES256-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-
SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-
GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:AES128-GCM-SHA256:AES128-SHA256:AES256-
SHA:AES128-SHA
High Compatibility
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:AES128-GCM-SHA256:AES256-SHA256:AES128-
SHA256:AES256-SHA:AES128-SHA:DHE-RSA-AES256-SHA256
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:AES128-GCM-SHA256:AES256-SHA256:AES128-
SHA256:AES256-SHA:AES128-SHA:DHE-RSA-AES256-SHA256
This can be modified as required, or the field can be cleared (blank) to allow all available ciphers (not
recommended)
2. Disable SSLv3 Ciphers - When checked this option disables all SSLv3 Ciphers.
3. Disable TLSv1.0 Ciphers - When checked this option disables all TLSv1.0 Ciphers.
4. Disable TLSv1.1 Ciphers - When checked this option disables all TLSv1.1 Ciphers.
5. Disable TLSv1.2 Ciphers - When checked this option disables all TLSv1.2 Ciphers.
6. Disable TLSv1.3 Ciphers - When checked this option disables all TLSv1.3 Ciphers.
If STunnel is selected:
Do not Insert Empty Fragments - This option should be enabled (checked) to ensure mitigation of
both the BEAST and CRIME MITM attacks. It is also required for PCI Testing.
Delay DNS Lookups - This option is useful for dynamic DNS, or when DNS is not available during
STunnel startup (road warrior VPN, dial-up configurations).
Honor Cipher Order - When choosing a cipher during an SSLv3 or TLSv1 handshake, normally the
client’s preference is used. If this directive is enabled, the server’s preference will be used instead.
Disable SSL Renegotiation - Applications of the SSL renegotiation include some authentication
scenarios, or re-keying long lasting connections. On the other hand this feature can facilitate a
trivial CPU-exhaustion DoS attack. This option should be enabled (checked) to mitigate the BEAST
Attack.
Time to Close - Configure the global client response timeout in seconds. This setting should not
require changing.
If HAProxy is selected:
To use HAProxy for SSL termination, the Associated Virtual Service field must be set
to a layer 7 VIP.
It’s also possible to create an HAProxy SSL termination at the same time that a layer
7 VIP is created. When creating the VIP, click [Advanced] and enable (check) Create
CA Certificate - If you want to use client certificate authentication, set the relevant CA Certificate
here.
ALPN - Select one or more (using the CTRL key) Application-Layer Protocol Negotiation protocol
IDs to advertise for this termination.
If Pound is selected:
Enable WebDAV Verbs - Selecting this option permits the use of the following commands:
Extended HTTP Requests: PUT, DELETE
Standard WebDAV verbs: LOCK, UNLOCK, PROPFIND, PROPPATCH, SEARCH, MKCOL, MOVE,
COPY, OPTIONS, TRACE, MKACTIVITY, CHECKOUT, MERGE, REPORT
Microsoft WebDAV extensions: SUBSCRIBE, BPROPPATCH, POLL, BMOVE, BCOPY, BDELETE,
CONNECT
Header Field Name & Header Field Value - Use to configure a custom Pound header.
Rewrite HTTP Redirects - If they point to the backend itself or to the listener (but with the wrong
protocol) the response will be changed to show the virtual host in the request.
Honor Cipher Order - When choosing a cipher during an SSLv3 or TLSv1 handshake, normally the
client’s preference is used. If this directive is enabled, the server’s preference will be used instead.
This option should be enabled to mitigate the BEAST attack.
Client Cipher Renegotiation - Sets whether the client is allowed to renegotiate the cipher order.
This option should be set to "No Client Renegotiation" to mitigate the BEAST attack. The options
are:
No Client Renegotiation - no client renegotiation will be honored
Secure Renegotiation - secure renegotiation will be honored
Insecure Renegotiation - insecure renegotiation will be honored
1. Using the WebUI, navigate to: Cluster Configuration > SSL Termination.
3. Scroll to the bottom of the screen and click New SNI Rule.
4. Enter an appropriate Friendly Name for the new rule, e.g. rule1.
Wildcard entries such as *.loadbalancer.org are also supported. Make sure that the SSL
certificates match accordingly.
7. Set the Associated Virtual Service dropdown according to your requirements, either:
Select the required Virtual Service where you’d like to forward traffic.
Or select Custom, specify the Backend IP Address and Backend Virtual Service Port and configure
Enable Proxy Protocol as needed - Proxy Protocol is enabled by default.
10. Once the rules are added, they’re displayed in a list under the Current SNI Rules section as shown in the
example below:
12. To apply the new settings, restart STunnel using the Reload STunnel button in the "Commit changes" box at
the top of the screen.
13. Once SNI rules have been configured for a particular STunnel VIP, this is indicated next to the STunnel VIP
name as shown below:
For information on configuring SSL termination, please refer to SSL Termination on the Load
Balancer (SSL Offloading).
1. Using the WebUI, navigate to: Cluster Configuration > Layer 7 - Virtual Services.
3. Scroll down to the SSL section and enable (check) the Enable Backend Encryption checkbox. If there are
existing Real Servers, you’ll be asked if you want to apply the new setting to those servers - click OK or
Cancel as required.
ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-
AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256
To change this, click [Advanced] in the SSL section, enable (check) the Use Custom Ciphers checkbox and
specify the required cipher in the Default Real Server Ciphers field.
5. Click Update.
4. Click Update.
Logging - Activate detailed logging of the Pound SSL termination service. When activated the Pound log is written
to /var/log/poundssl.log.
Client Timeout - Configure the global client response timeout in seconds. This setting should not require
changing. The default is 30 seconds.
Global Server Timeout - Configure the global Real Server response timeout in seconds. This setting should not
require changing.
Ulimit - This setting will change the maximum number of file descriptors available to the pound process. The
default is 81000.
Process Threads - Start the Pound process with X number of threads. Note that these threads are allocated at
start so if you’re not using them they will take up memory needlessly. The default is 250.
Transparent Proxy - Enable TProxy support in Pound SSL. The combination of Pound, TProxy, and HAProxy
allows SSL termination on the load balancer whilst passing the client’s IP address to the Real Servers. This option
also automatically enables TProxy for HAProxy.
A consequence of using Transparent Proxy with both Pound and HAProxy is that you can no
longer access the HAProxy Virtual Service directly. With transparency turned on, HAProxy will
Debug Level - Option to set the debugging level for all STunnel Services. The Debug Level is one of the syslog
level names or numbers emergency (0), Alert (1), Critical (2), err (3), Warning (4), Notice (5), Information (6), or
Debug (7). The higher the number the more detail will be contained in the STunnel Logs.
Disable Nagle Algorithm - With this option ticked (enabled) the Nagle Algorithm will be disabled. More details can
be found in RFC 896.
Enable FIPS 140-2 Mode - FIPS (Federal Information Processing Standards) are a set of standards that describe
document processing, encryption algorithms and other information technology standards for use within non-
military government agencies and by government contractors and vendors who work with the agencies. Check to
enable FIPS 140-2 mode for STunnel.
Configuring mTLS
mTLS can be enabled on the front-end between the client and the load balancer and on the back-end between the
load balancer and the load balanced servers.
The configuration steps below assume that there is an existing layer 7 VIP named AppServers with associated
Real Servers AppServer1, AppServer2 and AppServer3.
1. Using the WebUI, navigate to: Cluster Configuration > CA Certificate Families.
5. Click Choose File and browse to and select the relevant PEM or PFX file.
6. Click Create.
Front-end mTLS
Step 1 - Upload the Certificate to be Used for the SSL Termination
5. Click Choose File and select the relevant PEM or PFX file.
1. Using the WebUI, navigate to Cluster Configuration > SSL Termination and click Add a new Virtual Service.
Once the VIP is selected, the Label field will be auto-populated with SSL-AppServers. This
can be changed if preferred.
5. Set the SSL Certificate to the SSL Certificate uploaded previously, e.g. server-cert.
6. Set the CA Certificate to the CA Certificate Family created previously, e.g. mTLS.
Back-end mTLS
Step 1 - Upload the Certificate that will be Used to Prove the Identity of the Load Balancer
5. Click Choose File and select the relevant PEM or PFX file.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 7 – Real Servers and click Modify next to the first
Real Server.
If desired, update the Label to indicate that mTLS is now enabled, e.g. mTLS-AppServer1.
Enable (check) the Re-Encrypt to Backend checkbox.
Set the Verify Server Certificate dropdown to the certificate family created previously, e.g. mTLS.
Set the Send Client Certificate dropdown to the certificate uploaded above, e.g. client-cert.
3. Click Update.
1. Using the WebUI, navigate to: Cluster Configuration > CA Certificate Families.
4. Click Choose File and browse to and select the required CRL file.
5. Click Upload.
Once everything is configured, reload HAProxy using the Reload HAProxy button in the "Commit changes" box at
the top of the screen to apply the new settings.
VIP 1 - This is a layer 7 HTTP mode VIP that listens on port 80 and redirects all requests to VIP 2.
This VIP does not require any Real Servers. Once configured, it will be shown purple/green in the
System Overview.
VIP 2 - This is a layer 7 TCP mode VIP that listens on port 443 and load balances connections between Web
1 & Web 2.
This VIP is configured on the same IP address as VIP 1.
VIP 1 - This is a Pound or STunnel VIP that listens on port 443, terminates the SSL connection and then
forwards the decrypted HTTP traffic to VIP 2 on port 80.
VIP 2 - This is a layer 7 HTTP mode VIP that listens on port 80 and load balances connections between Web
1 & Web 2.
This VIP is configured on the same IP address as VIP 1.
Force to HTTPS is enabled - this is set by modifying the VIP, scrolling to the Other section and enabling
Force to HTTPS.
If you want to re-encrypt the data from the load balancer to the Real Server, enable
the Re-encrypt to Backend option for the each Real Server. For more information on
using this option, please refer to SSL Termination on the Load Balancer with Re-
encryption (SSL Bridging).
Using HAProxy
This method requires one VIP:
This VIP also handles SSL termination. To configure SSL termination at the same time as creating the
layer 7 VIP, click [Advanced] and in the termination section enable (check) the Create HAProxy SSL
Termination option.
Force to HTTPS is enabled - this is set by modifying the VIP, scrolling to the Other section and enabling
Force to HTTPS.
If you want to re-encrypt the data from the load balancer to the Real Server, enable
the Re-encrypt to Backend option for the each Real Server. For more information on
using this option, please refer to SSL Termination on the Load Balancer with Re-
encryption (SSL Bridging).
For layer 4 VIPs, both the agent and HTTP Server methods can be used, for Layer 7 VIPs, only the agent method is
supported.
By default, the agent listens on TCP port 3333, although this can be changed if required.
A telnet to port 3333 on a Real Server with the agent installed returns the current idle value as an integer value
between 0 and 100. By default, the idle value is based on current CPU utilization. This can also be based on RAM
utilization and the number of current connections or a combination of all three.
This can be configured by modifying the XML configuration file located in the agent’s installation folder - by
default C:\ProgramData\LoadBalancer.org\LoadBalancer. The file can be edited directly or by clicking the
Configuration button in the agent monitor program - see "Controlling the Agent" below.
The "initial weight" is the weight set in the WebUI for each Real Server.
For more information about the feedback agent, please refer to this blog.
Windows Agent
The latest Windows feedback agent (v4.6.0) can be downloaded here.
Linux/Unix Agent
The Linux feedback agent files can be downloaded using the following links:
cp lb-feedback.sh /usr/bin/lb-feedback.sh
chmod +x /usr/bin/lb-feedback.sh
cp lb-feedback /etc/xinetd.d/lb-feedback
chmod 644 /etc/xinetd.d/lb-feedback
/etc/init.d/xinetd restart
HTTP Server
You can use any HTTP server responding on port 3333 to give feedback information to the load balancer. The
format of this information must be an integer number of 0-100 without any header information. Using this
method, you can generate a custom response based on your application’s requirements.
1. Using the WebUI, navigate to Cluster Configuration > Layer 4 - Virtual Services or Cluster Configuration >
Layer 7 - Virtual Services.
For layer 4 VIPs set the Feedback Method to either Agent or HTTP depending on your requirements.
For layer 7 VIPs set the Feedback Method to Agent.
3. Click Update.
Key Concepts
GSLB enables the load balancer(s) to provide intelligent DNS responses to inbound client queries for one or more
sub domains. The responses given depend on the health of each endpoint and if Topology is configured, the
location of those endpoints relative to the client making the request. Where GSLB is deployed along side
application load balancing, the endpoints are usually the VIPs that are configured at each site. Where application
load balancing is not used and only GSLB is configured, the endpoints are normally the Real Servers.
DNS delegation is used to delegate responsibility for the sub domain(s) to the GSLB service on the load
balancers. Once delegated, it is the GSLB service on the load balancers that is responsible for providing the
response to DNS queries for that sub domain.
In a two site setup with an HA pair of load balancers in each site, once GSLB and DNS delegation are correctly
configured, the four load balancers act as intelligent name servers for the sub domains specified.
Key features
Reliable health checking service supporting both TCP, HTTP(S) and custom external checks so that only
healthy members/endpoints are returned on lookups
Failover, round robin and also a topology method that directs clients to servers in the same location
Can return single or multiple (up to 1024) answers at once
Option to fallback to any healthy server or refuse the query
Uses EDNS Client Subnet (ECS) by default so the client IP address / subnet is used when considering
topology. For more details, please refer to GSLB Advanced Configuration.
GSLB Configuration
GSLB is configured using the WebUI menu option: Cluster Configuration > GSLB Configuration. Four tabs are used
to configure GSLB as illustrated below:
Pools - Associate one or more Global Names with the relevant Members. Also defines health checks, load
balancing method, timeouts and various other settings.
Topologies - Define how network subnets and host addresses map to sites. In a multi-site deployment, this can
be used to ensure that clients connect to the nearest / most appropriate site. A topology groups together the
member(s) for a particular site and the clients who would normally connect via those members. Members and
clients can be specified using a subnet address such as 10.0.0.0/24 or a host address such as 10.0.0.1/32.
Global Names Name Name can be a combination of "0-9", "a-z", "A-Z", "-" (dash), "_"
(underscore) or a "." (dot).
Members Name Name can be a combination of "0-9", "a-z", "A-Z", "-" (dash), "_"
(underscore) or a "." (dot).
Pools Name Name can be a combination of "0-9", "a-z", "A-Z", "-" (dash), "_"
(underscore) or a "." (dot).
Monitor - HTTP Perform a HTTP or HTTPS GET depending on Monitor Use SSL.
Succeeds if HTTP response status is 200 or one of the codes
specified in Monitor Expected codes.
Monitor Use SSL - Whether to use SSL, default is "No"
(false).
Monitor Hostname - Hostname to supply in HTTP Host:
header. When using SSL this will also be supplied in SNI.
Monitor URL Path - A URL path to request, appended after
the member’s IP address, default is "/".
Monitor Port - Which port to check. If a value is not
provided, port 80 will be used when Monitor Use SSL is
false, port 443 will be used when Monitor Use SSL is true.
Monitor Expected Codes - A comma separated list of
HTTP codes to match in a response. Valid range is
between 100 and 599.
Monitor - TCP Perform a TCP connect. Optionally: send text, read response
and match a regex pattern.
Monitor Port - Which port to check.
Monitor Send String - A string to send after connecting to
the port, for example "check".
Monitor Match Return - A regex pattern to match (not case
sensitive) in the response, for example "up".
Monitor Status - A string, either "up" or "down", default is
"up".
Monitor - External Will run the script selected in the Monitor Script dropdown. The
check will receive the IP address and port of the member and
any additional arguments that are passed. If a Monitor Result is
set, the check will be deemed a success if the script returns the
configured string. If there is no Monitor Result the exit code will
be used.
Monitor Port - see above.
Monitor Script - Specify the script to use.
Monitor Parameters - A single or double quoted, comma
separated list of additional parameters you may wish to
pass in. This value is not required.
$1 = pool member IP
address
$2 = monitor port
Monitor Result - A string to match in the response, for
example "success".
Monitor - External This will dynamically adjust the weight based on the output of
Dynamic Weight the health check script. It should output between 0 and 10, 10
being of the highest priority and 0 being offline and removed
from the pool. The exit code should be 0 at all times, anything
else will report as a health check failure.
Monitor Port - see above.
Monitor Script - see above.
Monitor Parameters - see above.
wrr - Weighted round robin. Round robin with weighting.
twrr - Topology weighted round robin. As above but the
topology file is also considered to direct clients to end-
points in the same region/data center.
fogroup - Failover group. With this method, the first
healthy end-point is handed out continuously unless it
becomes unhealthy, then, the next healthy end-point is
used, etc. Can be used for active-backup scenarios.
Global Names A Pool can be associated with one or more global names. A
pool requires at least one global name. Use the CTRL key to
select multiple global names.
Members A pool must have at least one endpoint member. Drag and drop
the endpoints from Available Members to _Members in Use.
Advanced > In milliseconds, min: 100 (0.1s), max: 10000 (10 seconds).
Monitor Timeout
Advanced > Resolution behavior when all members of the pool are DOWN.
Fallback The options are:
any - Perform distribution among all the configured
members with non-zero weight ignoring the health status.
This is the default.
refuse - Refuse all queries. Note: fallback is set to "any"
with all member weights set to 0 will result in a NOERROR
response with no answer section data.
Toplogies Name Name can be a combination of "0-9", "a-z", "A-Z", "-" (dash), "_"
(underscore) or a "." (dot).
1. Using the WebUI, navigate to Cluster Configuration > Health Check Scripts and click Add New Health Check.
4. Using the Template dropdown select an appropriate template from the GSLB section of the list, e.g.
Example.
6. Click Update.
Once the health check has been added, it will appear in the Health Check Scripts list as shown below:
The new script will also appear in the Monitor Script dropdown when Monitor for a Pool is set to External:
1. Using the WebUI, navigate to Cluster Configuration > Health Check Scripts and click Upload Existing Health
Check.
If you have an HA Pair and the secondary node requires a different health check, click the
Choose File button next to Secondary Node Contents and browse to and select the
required file.
6. If the file is binary, enable the File is Binary checkbox - this will prevent the editor window being displayed.
7. Click Update.
Once the health check has been added, it will appear in the Health Check Scripts list and in the Monitor Script
dropdown as explained in Using Script Templates above.
To configure ECS:
2. Configure the Use Client Subnet Extension checkbox according to your requirements:
If enabled (default), the address of the requesting client will be used when considering Topologies
If disabled, the address of the client’s DNS server making the request will be used when considering
Topologies
Conceptual Overview
For multi-site deployments, GSLB functionality can be used to provide high availability and location affinity across
multiple sites.
Clients across multiple sites use the same FQDN to access the load balanced service(s)
Under normal operation, clients are directed to their site’s local load balanced cluster (configured using
Topology)
In the event that a site’s load balanced service(s) and/or load balancers are offline, then local clients are
automatically directed to a functioning load balanced cluster at another site
1. A client tries to access the load balanced service by using the service’s FQDN, in this example
service.domain.com.
2. The client sends a DNS lookup request for service.domain.com to its local DNS server.
3. The local site’s DNS server has the domain service.domain.com delegated to the load balancers.
4. The DNS server sends a delegated DNS lookup request for service.domain.com to one of the load
balancers.
5. The load balancer that received the delegated DNS lookup request replies to the DNS server by serving up
the appropriate, local VIP address. For example, if the request originated from the 10.0.0.0/24 subnet then
the VIP in that subnet is served up. Likewise, if the request originated from the 172.16.0.0/24 subnet then the
VIP in that subnet is served up. As such, clients are always directed to their local, on-site load balanced
service, provided that the on-site instance is online and available and topology has been correctly configured.
7. The client connects to the load balanced service at service.domain.com by using the local VIP address.
In the event that the load balanced cluster and/or load balancers at one site should completely
fail then local clients will be directed to the load balanced cluster at the other site and the service
will continue to be available. This style of multi-site failover is possible because the load
balancer’s GSLB functionality continuously health checks the service at each site. When the
service at a site is observed to be unavailable then that site’s IP address is no longer served
Appliance Configuration
GSLB must be configured on the Primary appliance at each site. The GSLB configuration must be identical at both
sites to ensure consistent DNS responses irrespective of which load balancer responds. The following steps
assume that an HA pair is already configured in each site. For more information on configuring HA, please refer to
Chapter 9 - Appliance Clustering for HA.
Data Center 1
Configure the first HA pair using the WebUI of the Primary appliance in data center 1.
4. Define the required Name and Hostname, in this example both are set to service.domain.com.
6. Click Submit.
6. Click submit.
7. To create the second member, click the New Member button again and configure the second member
(nodes-dc2,172.16.0.10) in the same way.
4. Set the Monitor to TCP – this will perform a basic TCP port connect to verify each member.
5. Set the Monitor Port to the required value, in this example 80.
8. Drag the required Members from the Available Members list to the Members in Use list, in this example
nodes-dc1 and nodes-dc2.
9. Click Submit.
4. Specify the IP/CIDR for the data center, in this example 10.0.0.0/24.
5. Now add the IP’s of clients that will connect to this member under normal circumstances. This can be either
as a subnet address or host address, for example 10.0.100.0/24 and 192.168.10.20/32. Separate each
address with a comma as shown.
If you have disabled ECS (see GSLB Advanced Configuration), the IP address of the DNS
servers that are making requests on behalf of clients should be added rather than the
client addresses.
6. Click Submit.
7. To create the second topology, click the New Topology button again and configure the second topology
(datacenter2) in the same way.
Data Center 2
Now configure the second HA pair in exactly the same way using the WebUI of the Primary appliance in data
center 2.
The DNS server at each site must be configured to delegate DNS requests for the subdomain in question (in this
case service.domain.com) to the load balancers. The load balancer’s GSLB services will then serve the
appropriate A records to the DNS servers and then back to the client making the request.
Using the example presented here, the DNS server at each site would be configured with a delegation for the
subdomain service.domain.com. The subdomain would be delegated to every load balancer across every site,
which provides multi-site redundancy.
The exact steps for creating a DNS delegation vary between different DNS servers and are outside the scope of
this document. For further information, a blog post that walks through creating a DNS delegation on a Microsoft
DNS server in the context of setting up GSLB on our appliance can be found here (see the section titled
“Delegating your subdomain to your GSLBs using Microsoft’s DNS Server”).
GSLB Diagnostics
Two reports are available to view the current state of the running GSLB service. These reports are very useful
when first setting up GSLB and also when diagnosing any issues. They are available via the WebUI menu option:
Reports.
GSLB Generic State – This report shows information about the running configuration of GSLB and also the health
state of each member/endpoint.
Example:
{
"timestamp": 1658309678.8496737,
"globalnames": {
"service.domain.com": {
"pool_name": "service-nodes",
"name": "service.domain.com",
"ttl": 30
}
},
"pools": {
"service-nodes": {
"last_status": true,
"max_addrs_returned": 1,
"members": [
{
"name": "nodes-dc1",
"status": true,
"ip": "10.0.0.10",
"weight": 1,
"region": "None",
"status_reason": "monitor passed",
"retries_left": 2,
"monitor_ip": "10.0.0.10"
},
{
Member 10.0.0.10 is passing its health check
Member 172.16.0.10 is failing its health check
The running configuration matches the settings configured in the WebUI
GSLB PPDNS State – This report shows information about the running configuration of GSLB and also shows
which results will be returned to inbound queries based on the current state of all members/endpoints.
Example:
{
"timestamp": 1658309678.9508624,
"pools": {
"service-nodes": {
"lb_method": "twrr",
"max_addrs_returned": 1,
"status": true,
"fallback": "any",
"dist_tables": {
"_default": {
"index": 0,
"num_unique_addrs": 1,
"rotation": [
"10.0.0.10"
]
}
Only member 10.0.0.10 is currently in the rotation of addresses being returned because as shown in the
GSLB Generic State example above, member 172.16.0.10 is failing its health check
The running configuration matches the settings configured in the WebUI
If you want to configure a multi-site load balanced deployment using GSLB and require further
assistance, please don’t hesitate to contact support@loadbalancer.org.
Configuring the Appliance via CLI, API & Direct Service Calls
A command line interface (CLI) is included that enables the appliance to be configured and controlled directly
from the command line. A JSON based Application Programming Interface (API) is also provided that enables CLI
commands to be called via a Web Service. The API is a wrapper around the CLI, so any CLI command can also be
called using the API.
It’s also possible to directly control layer 4 and layer 7 services, although the disadvantage here is that changes
made will not be reflected in the System Overview. If changes are made via the CLI or API, the System Overview is
kept in sync.
lbcli --help
lbcli activate-ca-certificate
Required Arguments
lbcli add-acl
or
lbcli --action acl --function add
Adds an ACL rule to the specified layer 7 virtual service. If allow-duplicates is on then the new ACL will always be
appended even if there is an existing, matching ACL defined already.
Required Arguments
Add CA Certificate
lbcli add-ca-certificate
Required Arguments
Optional Arguments
Required Arguments
Optional Arguments
lbcli add-csr
or
lbcli --action termination --function csr --type certificate
Create a Certificate Signing Request. When --yes-i-am-sure on is specified this command will overwrite existing
certificates.
Required Arguments
Optional Arguments
lbcli add-floating-ip
Required Arguments
Optional Arguments
lbcli add-gslb-globalname
or
lbcli --action gslb --function add --section globalnames
Required Arguments
Add a member
lbcli add-gslb-member
or
lbcli --action gslb --function add --section members
Required Arguments
Optional Arguments
Add a pool
lbcli add-gslb-pool
or
lbcli --action gslb --function add --section pools
Required Arguments
Optional Arguments
Add a topology
lbcli add-gslb-topology
or
lbcli --action gslb --function add --section topologies
Required Arguments
Optional Arguments
lbcli add-haproxy-associated-termination
Required Arguments
Optional Arguments
Add a header
lbcli add-header
or
lbcli --action headers --function add
Required Arguments
lbcli add-healthcheck
Add a health check to the cluster. If the --slave argument is omitted then the script passed to the --master
argument will be used on both appliances. If --base64 is yes then the health check body should be base64
encoded. If --zlib is set then the health check body should be compressed according to RFC-1950. If both base64
encoding and compression are used then the body should first be compressed then base64 encoded.
Required Arguments
Optional Arguments
lbcli add-layer4-server
or
lbcli --action add-rip --layer 4
Required Arguments
Optional Arguments
lbcli add-layer4-service
or
lbcli --action add-vip --layer 4
Required Arguments
Optional Arguments
lbcli add-layer7-server
or
lbcli --action add-rip --layer 7
Required Arguments
Optional Arguments
lbcli add-layer7-service
or
lbcli --action add-vip --layer 7
Optional Arguments
lbcli add-pbr
or
lbcli --action pbr --function set
lbcli set-pbr
Required Arguments
Optional Arguments
lbcli add-revocation-list
Required Arguments
lbcli add-static-ip
or
lbcli --action address --function add
Required Arguments
Optional Arguments
lbcli add-static-route
or
lbcli --action route --function static --type add
Required Arguments
Optional Arguments
lbcli add-termination
or
lbcli --action termination --function add --type stunnel
Required Arguments
Optional Arguments
Add a WAF
lbcli add-waf
Required Arguments
lbcli clone-healthcheck
Required Arguments
lbcli clone-layer4-service
or
lbcli --action clone-vip --layer 4
Required Arguments
Optional Arguments
lbcli clone-layer7-service
or
lbcli --action clone-vip --layer 7
Required Arguments
Optional Arguments
Delete the first matching ACL rule from the specified layer 7 virtual service.
Required Arguments
Delete CA Certificate
lbcli delete-ca-certificate
or
lbcli del-ca-certificate
Required Arguments
lbcli delete-ca-certificate-family
or
lbcli del-ca-certificate-family
Required Arguments
Delete a floating IP
Required Arguments
lbcli delete-gslb-globalname
or
lbcli --action gslb --function del --section globalnames
lbcli --action gslb --function delete --section globalnames
lbcli del-gslb-globalname
Required Arguments
Delete a member
lbcli delete-gslb-member
or
lbcli --action gslb --function del --section members
lbcli --action gslb --function delete --section members
lbcli del-gslb-member
Required Arguments
Delete a pool
lbcli delete-gslb-pool
or
lbcli --action gslb --function del --section pools
lbcli --action gslb --function delete --section pools
lbcli del-gslb-pool
Required Arguments
Delete a member
lbcli delete-gslb-topology
or
lbcli --action gslb --function del --section topologies
lbcli --action gslb --function delete --section topologies
lbcli del-gslb-topology
Required Arguments
lbcli delete-haproxy-associated-termination
or
lbcli del-haproxy-associated-termination
Required Arguments
lbcli delete-header
or
lbcli --action headers --function delete
lbcli --action headers --function del
lbcli del-header
Delete the first matching header rule from the specified layer 7 virtual service.
Required Arguments
lbcli delete-healthcheck
or
lbcli del-healthcheck
Required Arguments
lbcli delete-pbr
or
lbcli --action pbr --function del
lbcli --action pbr --function delete
lbcli del-pbr
Delete the first matching header rule from the specified layer 7 virtual service.
Required Arguments
lbcli delete-revocation-list
or
lbcli del-revocation-list
Required Arguments
lbcli delete-server
or
lbcli del-rip
lbcli delete-rip
Required Arguments
lbcli delete-service
or
Required Arguments
lbcli delete-static-ip
or
lbcli --action address --function delete
lbcli --action address --function del
lbcli del-static-ip
Required Arguments
Optional Arguments
lbcli delete-static-route
or
lbcli --action route --function static --type del
lbcli --action route --function static --type delete
lbcli del-static-route
Required Arguments
Optional Arguments
lbcli delete-termination
or
Required Arguments
Delete a WAF
lbcli delete-waf
Required Arguments
lbcli disable-api
or
lbcli --action api --function disable
lbcli disable-floating-ip
Make it so that the given floating IP cannot be made active on this appliance.
lbcli drain
Drain connections from the specified real server. No new connections will be allowed to the real server but
existing connections will remain until they are closed.
Required Arguments
lbcli edit-gslb-globalname
Required Arguments
Optional Arguments
Edit a member
lbcli edit-gslb-member
or
lbcli --action gslb --function edit --section members
Required Arguments
Optional Arguments
Edit a pool
lbcli edit-gslb-pool
or
lbcli --action gslb --function edit --section pools
Required Arguments
Optional Arguments
Edit a topology
lbcli edit-gslb-topology
or
lbcli --action gslb --function edit --section topologies
Required Arguments
Optional Arguments
lbcli edit-haproxy-associated-termination
Required Arguments
Optional Arguments
lbcli edit-healthcheck
Modify an existing health check on the cluster. If the --master argument is omitted then the --slave argument
cannot be specified. If --base64 is yes then the health check body should be base64 encoded. If --zlib is set then
the health check body should be compressed according to RFC-1950. If both base64 encoding and compression
are used then the body should first be compressed then base64 encoded.
Required Arguments
Optional Arguments
lbcli edit-layer4-server
or
lbcli --action edit-rip --layer 4
Required Arguments
Optional Arguments
lbcli edit-layer4-service
or
lbcli --action edit-vip --layer 4
Required Arguments
Optional Arguments
lbcli edit-layer7-server
Required Arguments
Optional Arguments
lbcli edit-layer7-service
or
lbcli --action edit-vip --layer 7
Required Arguments
Optional Arguments
lbcli edit-termination
or
lbcli --action termination --function edit --type stunnel
Required Arguments
Optional Arguments
lbcli edit-waf
Required Arguments
Optional Arguments
lbcli enable-api
or
lbcli --action api --function enable
Enable the API endpoint on the appliance. The apikey must be the unencoded value of the base64 string passed
in the X-LB-APIKEY header of all requests.
Required Arguments
Optional Arguments
lbcli enable-floating-ip
Make it so that the given floating IP can be made active on this appliance.
lbcli fix-floating-ip
Remove and re-add a floating IP in order to ensure it is up after altering the kernel state.
Required Arguments
lbcli flush-acls
Required Arguments
lbcli flush-static-ips
or
lbcli --action address --function flush
Optional Arguments
lbcli flush-static-routes
or
lbcli get-api
or
lbcli --action api --function get
Show the username, password and unencoded X-LB_APIKEY header value expected by the API endpoint.
lbcli get-default-route
or
lbcli --action route --function default --type get
Show the default route of the default table for this appliance.
lbcli get-dns
or
lbcli --action dns --function get
lbcli get-firewall
or
lbcli --action local-configuration --get firewall
lbcli get-graphing
or
lbcli --action local-configuration --get graphing
lbcli get-gslb-reports
or
lbcli --action gslb --function get --section reports
Required Arguments
lbcli get-hostname
or
lbcli --action hostname --function get
lbcli get-interface-offload
or
lbcli --action local-configuration --get interface_offload
lbcli get-management-gateway
or
lbcli --action local-configuration --get management_gateway
Show the details of the routing rule that traffic from this appliance’s WebUI will return via.
lbcli get-mtu
or
lbcli --action mtu --function get
lbcli get-ntp
or
lbcli --action local-configuration --get ntp
Show the Network Time Protocol servers this appliance will use.
lbcli get-proxy
or
lbcli --action local-configuration --get proxy
lbcli get-security
or
lbcli --action local-configuration --get security
lbcli get-smarthost
or
lbcli --action local-configuration --get smarthost
Show the email smarthost this appliance will use to send emails.
lbcli get-snmp
or
lbcli --action local-configuration --get snmp
Show the email smarthost this appliance will use to send emails.
lbcli get-syslog
or
lbcli --action local-configuration --get syslog
lbcli get-timedate
or
lbcli --action local-configuration --get timedate
lbcli get-updates
or
lbcli --action local-configuration --get updates
Show the URL of the updates server this appliance will use to fetch online updates.
lbcli ha_create
or
lbcli create-ha
Pair this appliance with another to create a high availability cluster. This appliance will become the primary server.
Required Arguments
lbcli halt
Close all connections to the specified real server and forbid and new connections.
Required Arguments
lbcli haproxy-clear-stick
Install a licence
lbcli install-licence
Required Arguments
lbcli list-acls
or
lbcli --action acl --function list
List all ACL rules for the specified layer 7 virtual service.
Required Arguments
List CA Certificates
lbcli list-ca-certificates
Required Arguments
lbcli list-certificates
or
lbcli --action termination --function list --type certificate
lbcli list-floating-ips
or
lbcli --action list --function floatingip
lbcli list-gslb-globalnames
or
lbcli --action gslb --function list --section globalnames
List members
lbcli list-gslb-members
or
lbcli --action gslb --function list --section members
List pools
lbcli list-gslb-pools
or
lbcli --action gslb --function list --section pools
List topologies
lbcli list-gslb-topologies
or
lbcli --action gslb --function list --section topologies
lbcli list-headers
or
lbcli --action headers --function list
List all header rules for the specified layer 7 virtual service.
Required Arguments
lbcli list-healthchecks
lbcli list-pbr
or
lbcli --action pbr --function get
lbcli get-pbr
Optional Arguments
lbcli list-static-ips
or
lbcli --action address --function get
lbcli list-static-routes
or
lbcli --action route --function static --type get
List WAFs
lbcli list-waf
lbcli lockdown
Lockdown the WebUI on this appliance so that it only responds to clients on the specified subnet.
Required Arguments
Optional Arguments
lbcli nodestatus
Report the status of the nodes in this cluster as this appliance understands them.
lbcli online
Bring a real server that is halted or drained back online by allowing it to receive connections once more.
Required Arguments
lbcli reboot
or
lbcli --action power --function restart
lbcli regenerate-default-certificate
or
lbcli --action termination --function regenerate_local --type certificate
Regenerate the default self-signed certificate used by the webui and SSL-terminations.
Reload WebUI
lbcli reload-apache
or
lbcli reload-webui
Reload GSLB
lbcli reload-gslb
Reload HAProxy
lbcli reload-haproxy
Reload Heartbeat
lbcli reload-heartbeat
Reload LDirectord
lbcli reload-ldirectord
Reload STunnel
Reload Syslog
lbcli reload-syslog
Reload WAF
lbcli reload-waf
Break a cluster
lbcli reset-cluster-config
or
lbcli --action reset --function cluster
Restart Autoscaled
lbcli restart-autoscaling
Restart AZHA
lbcli restart-azha
Restart Collectd
lbcli restart-collectd
Restart Firewall
lbcli restart-firewall
lbcli restart-gslb
Restart HAProxy
lbcli restart-haproxy
Restart Heartbeat
lbcli restart-heartbeat
Restart LDirectord
lbcli restart-ldirectord
Restart Pound
lbcli restart-pound
Restart SNMP
lbcli restart-snmp
Restart STunnel
lbcli restart-stunnel
Restart Syslog
lbcli restart-syslog
lbcli restart-waf
lbcli restore
Required Arguments
lbcli set-default-route
or
lbcli --action route --function default --type set
Required Arguments
lbcli set-dns
or
lbcli --action dns --function set
Optional Arguments
lbcli set-firewall
or
lbcli --action local-configuration --set firewall
Required Arguments
lbcli set-graphing
or
lbcli --action local-configuration --set graphing
Optional Arguments
Set hostname
lbcli set-hostname
or
lbcli --action hostname --function set
Required Arguments
lbcli set-interface-offload
or
lbcli --action local-configuration --set interface_offload
Required Arguments
lbcli set-management-gateway
or
lbcli --action local-configuration --set management_gateway
Set the routing rule which traffic from the WeBUI will follow for this appliance.
Required Arguments
lbcli set-mtu
or
lbcli --action mtu --function set
Required Arguments
lbcli set-ntp
or
lbcli --action local-configuration --set ntp
lbcli set-proxy
or
lbcli --action local-configuration --set proxy
Optional Arguments
Optional Arguments
lbcli set-smarthost
or
lbcli --action local-configuration --set smarthost
Set the email smarthost this appliance will use to send emails.
Optional Arguments
lbcli set-snmp
or
lbcli --action local-configuration --set snmp
Optional Arguments
lbcli set-syslog
Optional Arguments
lbcli set-timedate
or
lbcli --action local-configuration --set timedate
Required Arguments
lbcli set-updates
or
lbcli --action local-configuration --set updates
Optional Arguments
Show configuration.
lbcli show-full-config
or
lbcli --action list --function dumpconfig
lbcli show-layer4-advanced
or
lbcli --action list --function advanced --layer 4
lbcli show-layer4-services
or
lbcli --action list --function virtual --layer 4
lbcli show-layer7-advanced
or
lbcli --action list --function advanced --layer 7
lbcli show-layer7-services
or
lbcli --action list --function virtual --layer 7
lbcli show-revocation-list
Required Arguments
Shutdown appliance.
lbcli shutdown
or
lbcli --action power --function shutdown
lbcli status-gslb
lbcli support-download
Get uptime.
lbcli uptime
plink -pw loadbalancer root@192.168.111.42 "lbcli --action halt --vip VIP1 --rip RIP1"
Notes
2. The password for the "root" user is set during the Network Setup Wizard.
lbcli --action api --function enable --username (username) --password (password) --apikey (apikey))
e.g. The following command sets the API username to "loadbalancer", the password to "loadbalancer" and the
apikey to "ApIk3y2345118".
Once enabled, the API enables all CLI commands to be executed using HTTP POST requests.
When making API calls, the base64 encoded version of the apikey must be specified.
To obtain the base64 encoded version of the apikey, the following command can be used:
for example, if the apikey is set to "ApIk3y2345118" as in the example above, the following command can be
used:
In this case QXBJazN5MjM0NTExOAo= would be used in API requests. Please refer to the examples in Sending
API Requests.
API Endpoint
API calls must be posted to the following URL on the load balancer:
https://<appliance IP address>:9443/api/v2/
If the WebUI has been configured to listen on a different port, modify the URL accordingly. For
more details on setting the port, please refer to Service Socket Addresses.
lbcli command:
JSON equivalent:
lbcli command:
lbcli --action add-vip --layer 7 --vip VIP1 --ip 192.168.1.1 --ports 80 --mode http
JSON equivalent:
{
"lbcli": [{
"action": "add-vip",
"layer": "7",
"vip": "VIP1",
"ip": "192.168.1.1",
"ports": "80",
"mode": "http"
}]
}
lbcli command:
JSON equivalent:
{
"lbcli": [{
"action": "restart-haproxy"
}]
}
Using script/code
Example 1 - Using the Linux curl command
# Configure Variables
$user = "loadbalancer" # Appliance API Username
$pass = "loadbalancer" # Appliance API Password
$apikey = "ApIk3y2345118" # Appliance Non base64 encoded APIKEY
$ip = "192.168.111.220" # Appliance Management IP address
$jsonfile = "c:\api-json\add-vip.json" # Local path to JSON configuration file
# Disable certificate verification checks to allow for the self signed WebUI certificate on the
load balancer
if (-not ([System.Management.Automation.PSTypeName]'TrustAllCertsPolicy').Type)
{
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
}
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
{
"lbcli": [{
"action": "add-vip",
"layer": "7",
"vip": "VIP1",
"ip": "192.168.111.228",
"ports": "80",
"mode": "http"
}]
}
For more examples of making API call using other languages, please refer to our blog How to
automate load balancer deployments, Part 2!.
Add a TCP based Virtual Service & use weighted round robin scheduling:
Add a UDP based Virtual Service & use weighted least connection scheduling:
ipvsadm -D -t 192.168.65.180:80
ipvsadm -ln
Command output:
Please note that since these changes are being made directly to the running configuration, the
services that are displayed in the System Overview will no longer match the running
configuration when ipvsadm/socat commands are used. Using the lbcli command or the API
does not have this disadvantage since the System Overview will show the correct VIP and RIP
status.
Since these changes are being made directly to the running configuration, the services that are
displayed in the System Overview will no longer match the running configuration when
ipvsadm/socat commands are used. Using the lbcli command or the API does not have this
disadvantage since the System Overview will show the correct VIP and RIP status.
The load balancer includes a built-in WAF. It can be deployed in front of a web application to provide an additional
layer of security, where required. It is based on the free and open-source ModSecurity WAF engine and includes
the OWASP ModSecurity Core Rule Set (CRS) by default. The CRS is a set of generic attack detection rules. It
aims to protect web applications from a wide range of attacks, including the OWASP Top 10, while keeping false
positives (false alerts) to a minimum.
The OWASP Top 10 represents a broad consensus about the most critical security risks to web applications.
These risks are broken down into ten categories, as shown in the table below:
Category Description
A01 - Broken Access Control Access control failures typically lead to unauthorized information disclosure,
modification, or destruction of all data or performing a business function
outside the user’s limits.
A02 - Cryptographic Failures Previously known as Sensitive Data Exposure, the focus is on failures related
to cryptography (or lack thereof). Which often lead to exposure of sensitive
data.
A03 - Injection An application is vulnerable to injection attack when, for example, user-
supplied data is not validated, filtered, or sanitized by the application.
A04 - Insecure Design A new category which focuses on risks related to design and architectural
flaws, with a call for more use of threat modeling, secure design patterns, and
reference architectures.
A05 - Security Misconfiguration The application might be vulnerable if the application is, for example, missing
appropriate security hardening across any part of the application stack.
A06 - Vulnerable and Outdated You are likely vulnerable, for example, if you do not know the versions of all
Components components you use (both client-side and server-side), including nested
dependencies.
A07 - Identification and Previously known as Broken Authentication, confirmation of the user’s identity,
Authentication Failures authentication, and session management is critical to protect against
authentication-related attacks.
A08 - Software and Data A new category which focuses on making assumptions related to software
Integrity Failures updates, critical data, and CI/CD pipelines without verifying integrity.
A09 - Security Logging and Detecting and responding to breaches is critical. This category is to help
Monitoring Failures detect, escalate, and respond to active breaches.
A10 - Server-Side Request SSRF flaws occur whenever a web application is fetching a remote resource
Forgery (SSRF) without validating the user-supplied URL.
Notes
When configuring a WAF gateway on the load balancer, the associated layer 7 VIP must be selected from a
dropdown list. This enables the WAF to be automatically configured to listen on the same TCP socket as the
original layer 7 VIP. The WAF gateway is then automatically configured to forward packets to the original
layer 7 VIP.
Each WAF gateway is associated with one layer 7 VIP.
Once the WAF gateway is configured, the Label, IP Address, Port and Protocol of the associated layer 7 VIP
cannot be edited to ensure the association remains intact. If changes to these settings are required, take a
backup copy of the WAF gateway’s manual configuration (if one exists), remove the WAF, make the
changes, and then recreate the WAF.
5. Click Update.
5. Click Update.
3. The WAF label (name) field will be populated automatically, this can be changed if required.
4. The Rule Set will automatically choose the latest available stable version of the Core Rule Set. This should
not ordinarily require changing.
5. Click Update.
2. Reload the services (WAF and HAProxy) as prompted in the "Commit changes" message box.
Fail open: Traffic flow is allowed to continue by bypassing the failed WAF gateway, and service availability is
maintained (default)
Fail closed: Traffic flow is stopped until the WAF gateway can recover
Loadbalancer.org’s top priority is ensuring that services are highly available, first and foremost. As such, the load
balancer’s default policy is to fail open in the event of a WAF gateway failure.
There may be scenarios where security is the primary concern, with high availability being a secondary
1. Using the WebUI, navigate to: Cluster Configuration > Layer 7 - Virtual Services.
2. Find the relevant pair of layer 7 virtual services: the original layer 7 VIP and the automatically created WAF
frontend VIP, which is titled "WAF-…" by default.
5. Set the IP Address to the address that the original layer 7 VIP is listening on, e.g. 192.168.85.150.
6. Set the Port to the port that the original layer 7 VIP is listening on, e.g. 65435.
7. Click Update.
9. Reload the services (WAF and HAProxy) as prompted in the "Commit changes" message box.
2. Find the relevant pair of layer 7 virtual services: the original layer 7 VIP and the automatically created WAF
frontend VIP, which is titled "WAF-…" by default.
5. Set the IP Address to the local address of the fallback server, 127.0.0.1.
6. Set the Port to the port that the fallback server is listening on, 9081.
7. Click Update.
9. Reload the services (WAF and HAProxy) as prompted in the "Commit changes" message box.
It’s possible to use a dedicated, external fallback server instead of the local instance on
127.0.0.1. It’s also possible to customise the HTML of the built-in fallback page which is
presented to users. For more information, refer to the Fallback Server section.
After modifying any WAF gateway settings, be sure to save the new configuration to disk by
pressing the Update button and then apply the new configuration by reloading services as
prompted in the "Commit changes" message box.
When checked, this option completely disables all ModSecurity and CRS configuration for a given WAF gateway
Ruleset
Default value: Core Rule Set 3.3.2.
The WAF rule set to use for a given WAF gateway can be selected from the dropdown list. There are currently two
rule sets to choose from:
Core Rule Set 3.3.2 (default): the latest stable release of the OWASP ModSecurity Core Rule Set.
Core Rule Set 2: a legacy option provided for backward compatibility with older WAF installations. Provides
CRS version 2.2.9.
Paranoia Level
Default value: Paranoia Level 1.
This can be set to paranoia level 1, 2, 3, or 4. Paranoia level 1 offers a baseline level of security with a minimal, or
zero, need to tune away false positives. At the other end of the scale, paranoia level 4 offers the strongest level of
security and features many additional rules, but is extremely likely to cause a large number of false positives,
requiring a significant investment of time to tune them away.
See the section on Paranoia Levels for full details about this key concept.
Allows the WAF rule engine to take disruptive actions and block malicious looking traffic for this WAF gateway.
By default, the rule engine of a newly created WAF gateway is not able to block traffic. This is sometimes referred
to as detection only mode. This means that WAF rule logic is processed in order to examine traffic but disruptive
actions, e.g. "deny" and "drop", are never executed. As such, traffic is never blocked, even if it triggers rules and
appears to be malicious.
One approach to configuring and tuning a WAF deployment is to leave the WAF gateway in detection only mode,
pass known good traffic through the WAF (e.g. traffic from user testing), and then use the resulting log data to
tune the WAF. This "tuning" is accomplished by writing rule exclusions to cover all false positives caused by the
known good traffic. Once confident that all false positives have been accounted for, traffic blocking could then be
enabled for the WAF gateway’s rule engine. This takes the WAF gateway out of detection only mode and allows it
to start actively blocking malicious looking traffic.
Instructs the WAF engine to buffer and process response bodies. This allows the data in response bodies to be
inspected, for example an HTML response.
By default, a WAF gateway only processes request data, i.e. the data in requests coming in from clients. It’s also
possible to process response data, i.e. the data passed back to clients from the back end web application. This
can be useful, for example, to catch instances of data leakage, such as an unintended SQL database error being
passed back to the client (which may expose information about the type, version, and configuration of database
software in use).
Sets the inbound anomaly score threshold: the cumulative anomaly score at which an inbound request will be
blocked.
See the section on Anomaly Scoring for full details about this key concept.
Sets the outbound anomaly score threshold: the cumulative anomaly score at which an outbound response will
be blocked.
See the section on Anomaly Scoring for full details about this key concept.
Audit Mode
Default value: False.
Enables the audit logging engine for all transactions passing through a WAF gateway.
Audit logs record full transaction data, including full request bodies. This information can be invaluable for
troubleshooting particularly difficult issues.
Audit logs can grow extremely large very quickly. As such, it is strongly recommended not to
enable audit logging on a production machine: doing so is likely to fill the logging disk partition
and is likely to cause disruptive issues on production machines.
While not directly related to WAF functionality, the proxy sandwich that hosts the WAF functionality also features
a simple object cache. It will only cache objects that are HTML and below 64k in size, independent of any cache
or no-cache options that your real servers may provide.
Force 'no-cache' override
Location to exclude from the cache
Cache object size
While not directly related to WAF functionality, the proxy sandwich that hosts the WAF functionality also features
a simple web gateway / "double login" page. It supports the following authentication methods:
Locally configured static user
Google OpenID
Once enabled, users will be prompted for credentials when accessing the WAF:
Location to protect
Double login mode (Static user; OpenID Connect - Google)
Static password
The global WAF service has two advanced settings which can be configured through the WebUI. To access these
settings, navigate to Cluster Configuration > WAF - Advanced Configuration.
The two advanced settings are match limits, which help avoid potential regular expression denial of service
attacks by preventing PCRE (the underlying pattern matching library that evaluates regular expressions in
ModSecurity / the WAF) from consuming huge amounts of system resources. PCRE uses a function called
match() which it calls repeatedly, sometimes recursively. The match limits are imposed on the number of times
this function is called during a match. The default values are both 250000, which is the minimum recommended
value. A modern system (i.e. 4+ CPU cores, 8+ GB of RAM) could run without issue in production with match
limits of 500000.
After modifying any advanced WAF settings, be sure to save the new configuration to disk by
pressing the Set PCRE Match Limits button and then apply the new configuration by reloading
services as prompted in the "Commit changes" message box.
Defines the global value of the SecPcreMatchLimit directive, which sets a maximum limit on the number of
calls to the underlying match function when evaluating a regular expression in the WAF engine.
Defines the global value of the SecPcreMatchLimitRecursion directive, which sets a maximum limit on the
number of recursive calls to the underlying match function when evaluating a regular expression in the WAF
engine.
Anomaly Scoring
The Core Rule Set 3 is designed as an anomaly scoring rule set. This section explains what anomaly scoring is
and how to use it.
Individual rules designed to detect specific types of attacks and malicious behavior are executed. If a rule
matches, no immediate disruptive action is taken (e.g. the transaction is not blocked). Instead, the matched rule
contributes to a transactional anomaly score, which acts as a running total. The rules just handle detection,
adding to the anomaly score if they match. In addition, an individual matched rule will typically log a record of the
match for later reference, including the ID of the matched rule, the data that caused the match, and the URI that
was being requested.
Once all of the rules that inspect request data have been executed, blocking evaluation takes place. If the anomaly
score is greater than or equal to the inbound anomaly score threshold then the transaction is denied.
Transactions that are not denied continue on their journey.
Having separate inbound and outbound anomaly scores and thresholds allows for request data
and response data to be inspected and scored independently.
Most detected inbound threats carry an anomaly score of 5 (by default), while smaller violations, e.g. protocol and
standards violations, carry lower scores. An anomaly score threshold of 7, for example, would require multiple
rule matches in order to trigger a block (e.g. one "critical" rule scoring 5 plus a lesser-scoring rule, in order to reach
Rule coverage should be taken into account when setting anomaly score thresholds. Different CRS rule
categories feature different numbers of rules. SQL injection, for example, is covered by more than 50 rules. As a
result, a real world SQLi attack can easily gain an anomaly score of 15, 20, or even more. On the other hand, a rare
protocol attack might only be covered by a single, specific rule. If such an attack only causes the one specific rule
to match then it will only gain an anomaly score of 5. If the inbound anomaly score threshold is set to anything
higher than 5 then attacks like the one described will not be stopped. As such, a CRS installation should aim for
an inbound anomaly score threshold of 5.
Increasing the anomaly score thresholds may allow some attacks to bypass the CRS rules.
An outbound anomaly score threshold of 4 (the default) will block a transaction if any single
response rule matches.
CRS uses two anomaly score thresholds, which can be defined for each WAF gateway. This is done using the
WebUI, by navigating to: Cluster Configuration > WAF - Gateway and clicking Modify next to the relevant WAF. The
two score thresholds are:
Inbound Anomaly Score threshold
Outbound Anomaly Score threshold
Severity Levels
Each CRS rule has an associated severity level. Different severity levels have different anomaly scores associated
with them. This means that different rules can increment the anomaly score by different amounts if the rules
match.
The four severity levels and their default anomaly scores are:
CRITICAL 5
ERROR 4
WARNING 3
NOTICE 2
For example, by default, a single matching CRITICAL rule would increase the anomaly score by 5, while a single
matching WARNING rule would increase the anomaly score by 3.
Paranoia Levels
Paranoia levels are an essential concept when working with the Core Rule Set. This section explains the concept
behind paranoia levels and how to work with them on a practical level.
This continues at PL 3, where more rules are added, namely for certain specialized attacks. This leads to even
more false alarms. Then at PL 4, the rules are so aggressive that they detect almost every possible attack, yet
they also flag a lot of legitimate traffic as malicious.
A higher paranoia level makes it harder for an attacker to go undetected. Yet this comes at the cost of more false
positives: more false alarms. That’s the downside to running a rule set that detects almost everything: your
business / service / web application is also disrupted.
When false positives occur they need to be tuned away. In ModSecurity parlance: rule exclusions need to be
written. A rule exclusion is a rule that disables another rule, either disabled completely or disabled partially only for
certain parameters or for certain URIs. This means the rule set remains intact yet the CRS installation is no
longer affected by the false positives.
Depending on the complexity of the service (web application) in question and on the paranoia
level, the process of writing rule exclusions can be a substantial amount of work.
For more information on this topic, see the section on False Positives and Tuning.
1 Baseline security with a minimal need to tune away false positives. This is CRS for everybody
running an HTTP server on the internet. Please report any false positives encountered with a PL
1 system to support@loadbalancer.org.
2 Rules that are adequate when real user data is involved. Perhaps an off-the-shelf online shop.
Expect to encounter false positives and learn how to tune them away.
3 Online banking level security with lots of false positives. From the CRS project’s perspective,
false positives are accepted and expected here, so it’s important to learn how to write rule
exclusions.
4 Rules that are so strong (or paranoid) they’re adequate to protect the "crown jewels". To be used
at one’s own risk: be prepared to face a large number of false positives.
Running at the highest paranoia level, PL 4, may seem appealing from a security standpoint, but it could take
many weeks to tune away the false positives encountered. It is crucial to have enough time to fully deal with all
false positives.
Failure to properly tune an installation runs the risk of exposing users to a vast number of false
positives. This can lead to a poor user experience, and might ultimately lead to a decision to
completely disable the WAF / Core Rule Set. As such, setting a high PL in blocking mode
without adequate tuning to deal with false positives is very risky.
For an enterprise environment, consider developing an internal policy to map the risk levels and security needs of
different assets to the minimum acceptable paranoia level to be used for them, for example:
Risk Class 0: No personal data involved → PL 1
Risk Class 1: Personal data involved, e.g. names and addresses → PL 2
Risk Class 2: Sensitive data involved, e.g. financial/banking data; highest risk class → PL 3
From the Paranoia Level dropdown list, select the desired paranoia level.
At the conceptual level, these two ideas could be mixed if the goal was to create a particularly granular security
concept. For example, saying "we define the anomaly threshold to be 10, but we compensate for this by running
at paranoia level 3, which we acknowledge brings more rule alerts and higher anomaly scores."
This is technically correct but it overlooks the fact that there are attack categories where CRS scores very low. For
example, there is a plan to introduce a new rule to detect POP3 and IMAP injections: this will be a single rule, so,
under normal circumstances, an IMAP injection would never score more than 5. Therefore, an installation running
at an anomaly threshold of 10 could never block an IMAP injection, even if running at PL 3. In light of this, it’s
generally advised to keep things simple and separate: a CRS installation should aim for an anomaly threshold of
5 and a paranoia level as deemed appropriate.
False positives are particularly likely to happen when operating at higher paranoia levels. While paranoia level 1 is
designed to cause few, ideally zero, false positives, higher paranoia levels are increasingly likely to cause false
positives. Each successive paranoia level introduces additional rules, with higher paranoia levels adding more
aggressive rules. As such, the higher the paranoia level is the more likely it is that false positives will occur. That is
the cost of the higher security provided by higher paranoia levels: the additional time it takes to tune away the
increasing number of false positives.
Consider the CRS inspecting a request with a URL like the following:
At paranoia level 2, the wp_post query string parameter would trigger a match against an XSS attack rule due to
the presence of HTML tags. CRS is unaware that the problem is properly mitigated on the server side and, as a
result, the request causes a false positive and may be blocked. The false positive may generate an error log line
like the following:
[Wed Jan 01 00:00:00.123456 2022] [:error] [pid 2357:tid 140543564093184] [client 10.0.0.1:0]
[client 10.0.0.1] ModSecurity: Warning. Pattern match
"<(?:a|abbr|acronym|address|applet|area|audioscope|b|base|basefront|bdo|bgsound|big|blackface|blink
|blockquote|body|bq|br|button|caption|center|cite|code|col|colgroup|comment|dd|del|dfn|dir|div|dl|d
t|em|embed|fieldset|fn|font|form|frame|frameset|h1|head ..." at ARGS:wp_post. [file
"/etc/crs/rules/REQUEST-941-APPLICATION-ATTACK-XSS.conf"] [line "783"] [id "941320"] [msg "Possible
XSS Attack Detected - HTML Tag Handler"] [data "Matched Data: <h1> found within ARGS:wp_post:
<h1>welcome to my blog</h1>"] [severity "CRITICAL"] [ver "OWASP_CRS/3.3.2"] [tag "application-
multi"] [tag "language-multi"] [tag "platform-multi"] [tag "attack-xss"] [tag "OWASP_CRS"] [tag
"capec/1000/152/242/63"] [tag "PCI/6.5.1"] [tag "paranoia-level/2"] [hostname "www.example.com"]
[uri "/"] [unique_id "Yad-7q03dV56xYsnGhYJlQAAAAA"]
This example log entry provides lots of information about the rule match. Some of the key pieces of information
are:
The message from ModSecurity, which explains what happened and where:
The rule ID of the matched rule:
[id "941320"]
The additional matching data from the rule, which explains precisely what caused the rule match:
Making direct modifications to CRS rule files is a bad idea and is strongly discouraged.
It may seem logical to prevent false positives by modifying the offending CRS rules. If a detection pattern in a
CRS rule is causing matches with genuine transactions then the pattern could be modified. This is a bad idea.
Directly modifying CRS rules essentially creates a fork of the rule set. Any modifications made would be undone
by a rule set update, meaning that any changes would need to be continually reapplied by hand. This is a tedious,
time consuming, and error-prone solution.
There are alternative ways to deal with false positives, as described below. These methods sometimes require
slightly more effort and knowledge but they do not cause problems when performing rule set updates.
Rule Exclusions
Overview
The ModSecurity WAF engine has flexible ways to tune away false positives. It provides several rule exclusion
(RE) mechanisms which allow rules to be modified without directly changing the rules themselves. This makes it
possible to work with third-party rule sets, like the Core Rule Set, by adapting rules as needed while leaving the
rule set files intact and unmodified. This allows for easy rule set updates.
Configure-time rule exclusions: Rule exclusions that are applied once, at configure-time (e.g. when
(re)starting or reloading ModSecurity, or the server process that holds it). For example: "remove rule X at
startup and never execute it."
This type of rule exclusion takes the form of a ModSecurity directive, e.g. SecRuleRemoveById.
Runtime rule exclusions: Rule exclusions that are applied at runtime on a per-transaction basis (e.g.
exclusions that can be conditionally applied to some transactions but not others). For example: "if a
transaction is a POST request to the location 'login.php', remove rule X."
In addition to the two types of exclusions, rules can be excluded in two different ways:
Exclude the entire rule/tag: An entire rule, or entire category of rules (by specifying a tag), is removed and
will not be executed by the rule engine.
Exclude a specific variable from the rule/tag: A specific variable will be excluded from a specific rule, or
excluded from a category of rules (by specifying a tag).
These two methods can also operate on multiple individual rules, or even entire rule categories (identified either
by tag or by using a range of rule IDs).
The combinations of rule exclusion types and methods allow for writing rule exclusions of varying granularity.
Very coarse rule exclusions can be written, for example "remove all SQL injection rules" using
SecRuleRemoveByTag. Extremely granular rule exclusions can also be written, for example "for transactions to
the location 'web_app_2/function.php', exclude the query string parameter 'user_id' from rule 920280" using a
SecRule and the action ctl:ruleRemoveTargetById.
The different rule exclusion types and methods are summarized in the table below, which presents the main
ModSecurity directives and actions that can be used for each type and method of rule exclusion:
It is not currently possible to exclude phase 1 rules using runtime rule exclusions on
Loadbalancer.org appliances. Configure-time rule exclusions must be used instead. This is a
known limitation of the WAF implementation. The Core Rule Set Map can be used to lookup the
phase of a CRS rule. More information on rule phases can be found in the ModSecurity
Reference Manual.
There’s also a third group of rule exclusion directives and actions, the use of which is
discouraged. As well as excluding rules "ById" and "ByTag", it’s also possible to exclude "ByMsg"
(SecRuleRemoveByMsg, SecRuleUpdateTargetByMsg, ctl:ruleRemoveByMsg, and
ctl:ruleRemoveTargetByMsg). This excludes rules based on the message they write to the
Rule Tags
CRS rules typically feature multiple tags, grouping them into different categories. For example, a rule might be
tagged by attack type ('attack-rce', 'attack-xss', etc.), by language ('language-java', 'language-php', etc.), and by
platform ('platform-apache', 'platform-unix', etc.).
Tags can be used to remove or modify entire categories of rules all at once, but some tags are more useful than
others in this regard. Tags for specific attack types, languages, and platforms may be useful for writing rule
exclusions. For example, if lots of the SQL injection rules are causing false positives but SQL isn’t in use anywhere
in the back end web application then it may be worthwhile to remove all CRS rules tagged with "attack-sqli"
(SecRuleRemoveByTag attack-sqli).
Some rule tags are not useful for rule exclusion purposes. For example, there are generic tags like "language-
multi" and "platform-multi": these contain hundreds of rules across the entire CRS, and they don’t represent a
meaningful rule property to be useful in rule exclusions. There are also tags that categorize rules based on well
known security standards, like CAPEC and PCI DSS (e.g. 'capec/1000/153/267', 'PCI/6.5.4'). These tags may be
useful for informational and reporting purposes but are not useful in the context of writing rule exclusions.
Excluding rules using tags may be more useful than excluding using rule ranges in situations where a category of
rules is spread across multiple files. For example, the "language-php" rules are spread across several different rule
files (both inbound and outbound rule files).
Rule Ranges
As well as rules being tagged using different categories, CRS rules are organized into files by general category. In
addition, CRS rule IDs follow a consistent numbering convention. This makes it easy to remove unwanted types
of rules by removing ranges of rule IDs. For example, the file REQUEST-913-SCANNER-DETECTION.conf
contains rules related to detecting well known scanners and crawlers, which all have rule IDs in the range 913000-
913999. All of the rules in this file can be easily removed using a configure-time rule exclusion, like so:
SecRuleRemoveById "913000-913999"
Excluding rules using rule ranges may be more useful than excluding using tags in situations where tags are less
relevant or where tags vary across the rules in question. For example, a rule range may be the most appropriate
solution if the goal is to remove all rules contained in a single file, regardless of how the rules are tagged.
SecRuleRemoveByTag
A regular expression is used for the tag match. For example, SecRuleRemoveByTag "injection"
would match both "attack-injection-generic" and "attack-injection-php".
A regular expression is used for the message match. For example, SecRuleRemoveByMsg "File
Access" would match both "OS File Access Attempt" and "Restricted File Access Attempt".
A regular expression can optionally be used in the target specification by enclosing the regular expression in
forward slashes. This is useful for dealing with dynamically named variables, like so:
This example would exclude request cookies named "uid_0123456", "uid_6543210", etc. from rule 942440.
The "ctl" action for writing runtime rule exclusions does not support any use of regular
expressions. This is a known limitation of the ModSecurity rule engine.
Example 1 (SecRuleRemoveById)
(Configure-time RE. Exclude entire rule.)
Scenario: Rule 933151, "PHP Injection Attack: Medium-Risk PHP Function Name Found", is causing false
positives. The web application behind the WAF makes no use of PHP. As such, it is deemed safe to tune away
this false positive by completely removing rule 933151.
Rule Exclusion:
# CRS Rule Exclusion: 933151 - PHP Injection Attack: Medium-Risk PHP Function Name Found
SecRuleRemoveById 933151
Example 2 (SecRuleRemoveByTag)
(Configure-time RE. Exclude entire tag.)
Scenario: Several different parts of a web application are causing false positives with various SQL injection rules.
None of the web services behind the WAF make use of SQL, so it is deemed safe to tune away these false
positives by removing all the SQLi detection rules.
Rule Exclusion:
Example 3 (SecRuleUpdateTargetById)
(Configure-time RE. Exclude specific variable from rule.)
Scenario: The content of a POST body parameter named "wp_post" is causing false positives with rule 941320,
Rule Exclusion:
# CRS Rule Exclusion: 941320 - Possible XSS Attack Detected - HTML Tag Handler
SecRuleUpdateTargetById 941320 "!ARGS:wp_post"
Example 4 (SecRuleUpdateTargetByTag)
(Configure-time RE. Exclude specific variable from rule.)
Scenario: The values of request cookies with random names of the form "uid_<STRING>" are causing false
positives with various SQL injection rules. It is decided that it is not a risk to allow SQL-like content in cookie
values, however it is deemed unacceptable to disable the SQLi detection rules for anything apart from the request
cookies in question. It is decided to tune away these false positives by excluding only the problematic request
cookies from the SQLi detection rules. A regular expression is to be used to handle the random string portion of
the cookie names.
Rule Exclusion:
# CRS Rule Exclusion: Exclude the request cookies "uid_<STRING>" from the SQLi detection rules
SecRuleUpdateTargetByTag attack-sqli "!REQUEST_COOKIES:/^uid_.*/"
Example 5 (ctl:ruleRemoveById)
(Runtime RE. Exclude entire rule.)
Scenario: Rule 920230, "Multiple URL Encoding Detected", is causing false positives at the specific location
"/webapp/function.php". This is being caused by a known quirk in how the web application has been written, and
it cannot be fixed in the application. It is deemed safe to tune away this false positive by removing rule 920230 for
that specific location only.
Rule Exclusion:
Example 6 (ctl:ruleRemoveByTag)
(Runtime RE. Exclude entire tag.)
Scenario: Several different locations under "/web_app_1/content" are causing false positives with various SQL
injection rules. Nothing under that location makes any use of SQL, so it is deemed safe to remove all the SQLi
Rule Exclusion:
Example 7 (ctl:ruleRemoveTargetById)
(Runtime RE. Exclude specific variable from rule.)
Scenario: The content of a POST body parameter named "text_input" is causing false positives with rule 941150,
"XSS Filter - Category 5: Disallowed HTML Attributes", at the specific location "/dynamic/new_post". Removing
this rule entirely is deemed to be unacceptable: the rule is not causing any other issues, and the protection it
provides should be retained for everything apart from "text_input" at the specific problematic location. It is
decided to tune away this false positive by excluding "text_input" from rule 941150 for location
"/dynamic/new_post" only.
Rule Exclusion:
# CRS Rule Exclusion: 941150 - XSS Filter - Category 5: Disallowed HTML Attributes
SecRule REQUEST_URI "@beginsWith /dynamic/new_post" \
"id:1020,\
phase:1,\
pass,\
nolog,\
ctl:ruleRemoveTargetById=941150;ARGS:text_input"
Example 8 (ctl:ruleRemoveTargetByTag)
(Runtime RE. Exclude specific variable from rule.)
Scenario: The values of request cookie "uid" are causing false positives with various SQL injection rules when
trying to log in to a web service at location "/webapp/login.html". It is decided that it is not a risk to allow SQL-like
content in this specific cookie’s values for the login page, however it is deemed unacceptable to disable the SQLi
detection rules for anything apart from the specific request cookie in question at the login page only. It is decided
to tune away these false positives by excluding only the problematic request cookie from the SQLi detection rules,
and only when accessing "/webapp/login.html".
Rule Exclusion:
# CRS Rule Exclusion: Exclude the request cookie "uid" from the SQLi detection rules
SecRule REQUEST_URI "@beginsWith /webapp/login.html" \
"id:1030,\
It’s possible to write a conditional rule exclusion that tests something other than just the request
URI. Conditions can be built which test, for example, the source IP address, HTTP request
method, HTTP headers, and even the day of the week.
Multiple conditions can also be chained together to create a logical AND by using ModSecurity’s
chain action. This allows for creating powerful rule logic like "for transactions that are from
source IP address 10.0.0.1 AND that are for location '/login.html', exclude the query string
parameter 'user_id' from rule 920280". Extremely granular and specific rule exclusions can be
written, in this way.
1. Using the WebUI, navigate to: Cluster Configuration > WAF - Manual Configuration.
2. From the dropdown list, select the name of the WAF gateway in question.
By default, a WAF gateway’s manual configuration contains a set of commented-out examples. The examples
can be uncommented and adapted for use. Alternatively, all of the example text can safely be deleted to give a
clean slate.
To add rule exclusions or custom rules, write or paste the custom content directly into the text box.
Requests with large bodies (excluding file uploads) consume a significant amount of CPU time while the
WAF rules are executed against the body data.
Requests with large bodies consume a large amount of memory while they’re buffered for inspection.
Requests with very large headers consume a significant amount of CPU time while the WAF rules are
executed against the header data.
Large file uploads consume a large amount of disk space while they’re buffered during a transaction.
A WAF can thus be attacked from multiple angles: attempting to exhaust its CPU, memory, and disk space. As
such, it is imperative to control and limit the resources that a single HTTP transaction can consume. This
hardens the WAF against these kinds of attacks.
Default Limits
Maximum request body size (including file uploads): 13 MB (13107200 bytes)
Maximum request body size (excluding file uploads): 131 kB (131072 bytes)
Maximum amount of request body to store in memory before switching to disk: 131 kB (131072 bytes)
Maximum size of a single HTTP request header field: 8 kB (8190 bytes)
The default limits for the maximum non-file request body size and the maximum amount of
memory to use to buffer a request body are equal. This means that non-file request bodies
under the size limit will always be buffered in memory, which is fast. Only request bodies of file
uploads exceeding 131 kB will be streamed to disk, which is much slower.
Example 1
As an example, under the default limits, it is permissible to submit an HTTP request with up to 131 kB of non-file
upload data, e.g. data from filling in form fields:
receive a 400 Bad Request response status code if the WAF engine is enabled
pass through the WAF gateway without issue if the WAF engine is not enabled, i.e. is in detection only mode
Example 2
As another example, under the default limits, it is permissible to submit an HTTP request with up to 13 MB of file
upload data, either one large file or multiple smaller files:
receive a 500 Internal Server Error response status code if the WAF engine is enabled
pass through the WAF gateway without issue if the WAF engine is not enabled, i.e. is in detection only mode
As an example, to increase the limit to 20 MB for a given WAF gateway, add the following directive to the WAF
gateway’s manual configuration:
For additional granularity, a Location directive can be used to increase the limit for certain locations only. For
example:
# For the admin portal upload page only, buffer request bodies of up to 500 MB
# in size. Allows for requests to contain up to 500 MB of file upload data.
<Location "/admin-portal/upload.php">
If a web application should accept request bodies containing more than the default limit of 131 kB of non-file
upload data then the limit should be increased. Some web applications transfer state data or small files in this
way, which can often exceed the 131 kB limit where this technique is used.
Increasing the non-file upload request body size limit makes the WAF more susceptible to
denial-of-service attacks. This limit should only be increased if necessary and should still be
kept as small as possible.
As an example, to increase the limit to 200 kB for a given WAF gateway, add the following directive to the WAF
gateway’s manual configuration:
Because increasing this limit makes a WAF more susceptible to denial-of-service attacks, it is a very good idea to
increase the limit only where it is needed. For additional granularity, a Location directive can be used to
increase the limit for certain locations only. For example:
# For the user profile avatar upload functionality only, buffer request bodies
# containing up to 200 kB of non-file upload data. Allows users to upload
# avatars up to 200 kB in size.
<Location "/user/profile/avatar-upload.php">
SecRequestBodyNoFilesLimit 200000
</Location>
The limit for the maximum amount of memory to use to buffer a request body can be set using
the SecRequestBodyInMemoryLimit directive. The default values of the
SecRequestBodyNoFilesLimit and SecRequestBodyInMemoryLimit directives are
equal.
Note that the LimitRequestFieldSize directive cannot be defined inside a Location directive, so being
granular with this setting is not possible.
To handle HTTP request header fields above 15 kB in size it’s necessary to increase HAProxy’s
Request buffer length. This can be found under Cluster Configuration > Layer 7 - Advanced
Configuration. This is required as HAProxy becomes the limiting factor, not Apache.
A record of each rule match is written to the WAF error log.
If a transaction’s inbound or outbound anomaly score is high enough to reach either the inbound or
outbound anomaly score thresholds then a record of this is written to the WAF error log, stating the action
taken, if any (e.g. "Access denied with code 403").
A summary of the transaction’s anomaly score is written to the WAF error log, stating the makeup of the
anomaly score total per-paranoia level and per-rule category.
If a rule is expected to match and should not log those matches for some reason (e.g. it’s a
helper rule), the nolog action can be used to prevent a rule from creating error log output and
cluttering up the log.
2. From the dropdown list, select the name of the WAF gateway in question.
Default View
After selecting a WAF gateway from the dropdown list, the default view displays error log lines in their raw,
unedited format. The most recent 500 log lines are displayed in reverse chronological order, with the most recent
log entry shown at the top.
Log entries are broken up across multiple lines to aid readability. Individual log entries are separated by horizontal
lines.
Breakdown View
When the Breakdown button is pressed, a summary of which matched rules are present in the error log is
presented. The information presented is:
Rule ID: The ID number of the rule that matched.
Hostname: The host name that the matches were against. Useful to break up data if multiple services are
sitting behind a single WAF gateway.
Severity (optional): If present, the severity of the rule that matched (as described in the Severity Levels
section).
URI: The location that the match was against.
Fixes View
When the Fixes button is pressed, a best efforts, automated list of rule exclusions are generated. These rule
exclusions are based on the assumption that only known, good traffic has passed through (and hence been
logged by) the WAF gateway. It is thus assumed that the error log contains only false positives, which the load
balancer attempts to generate rule exclusions to resolve.
The Fixes view is not a substitute for a proper tuning process. Writing meaningful rule
exclusions requires an understanding of the web service behind the WAF gateway, which the
script that generates the automated rule exclusions can never provide.
The date and time that the log entry was written.
[client 192.168.85.1]
A summary message from ModSecurity describing what has happened and where.
[id "932150"]
[data "Matched Data: ping found within ARGS:text_input: ping pong is great!"]
[severity "CRITICAL"]
The severity of the rule that matched (as described in the Severity Levels section).
[tag "platform-unix"]
A tag used to categorise the type of rule or type of attack it is designed to detect.
[tag "paranoia-level/1"]
A tag used to report the paranoia level of the rule that matched.
[tag "OWASP_CRS"]
A tag used to report that the matched rule was part of the Core Rule Set.
[hostname "example.com"]
[uri "/"]
[unique_id "YaoKDmrMWmz0GZzK9ZmMCAAAAEA"]
The transaction’s unique ID, which ties together all log entries relating to a single transaction.
An error log entry from the Simple view showing the outcome of inbound blocking evaluation is presented below:
ModSecurity: Access denied with code 403 (phase 2). Operator GE matched 5 at
TX:anomaly_score.
A summary message from ModSecurity describing what has happened (access denied with status code 403
Forbidden) and why (anomaly score reached threshold of 5).
A summary message from the matched (blocking evaluation) rule describing what happened, in a slightly
more readable way.
An error log entry from the Simple view showing an event correlation summary is presented below:
A summary message from the matched (event correlation) rule giving a full breakdown of the transaction’s
anomaly score, both by paranoia level and category. The paranoia level breakdown is given in ascending
paranoia level (i.e. PL 1, PL 2, PL 3, PL 4).
For new Layer 4 VIPs the default check type is Connect to Port.
The following table details the health check types available and the associated options for each:
Check Port The port to monitor. If specified this setting overrides the default which is
the Real Server port. For multiport VIPs where the Real Server port field is
left blank, the default checkport is the first in the list. This can be changed
using this field if required. Note that for DR mode, the port cannot be
specified at the Real Server level, so the port specified for the VIP is used.
Protocol Set the protocol for the health check. The options are:
HTTP - use HTTP as the negotiate protocol
HTTPS - use HTTPS as the negotiate protocol
HTTP Proxy - Use an HTTP proxy check
FTP - use FTP as the negotiate protocol
IMAP (IPv4 only) - use IMAP as the negotiate protocol
IMAPS (IPv4 only) - use IMAPS as the negotiate protocol
POP - use POP as the negotiate protocol
POPS - use POPS as the negotiate protocol
LDAP (IPv4 only) - use LDAP as the negotiate protocol
SMTP - use SMTP as the negotiate protocol
NNTP (IPv4 only) - use NNTP as the negotiate protocol
DNS - use DNS as the negotiate protocol
MySQL (IPv4 only) - use MySQL as the negotiate protocol (also
requires username/password)
SIP - use SIP as the negotiate protocol
Simple TCP - Sends a request string to the server and checks the
response
RADIUS (IPv4 only) - use RADIUS as the negotiate protocol
Virtual Host Used when using a HTTP or HTTPS negotiate check. Sets the host header
used in the HTTP request. In the case of HTTPS this generally needs to
match the common name of the SSL certificate.
Request to Send The use of this parameter varies with the protocol selected in the
negotiate Protocol.
With protocols such as HTTP and FTP, this should be the object to
request from the server. Bare filenames will be requested from the
web or FTP root.
With DNS, this should be either a name to look up in an A record, or
an IP address to look up in a PTR record.
With databases, this should be a SQL SELECT query. The Response
Expected field in not used by the SQL health check since the data
returned in not read, the answer must simply be one or more rows.
With LDAP, this should be the search base for the query. The load
balancer will perform an (ObjectClass=*) search relative to this base.
With Simple TCP, this should be a string to send verbatim to the
server.
Response This is the response that must be received for the check to be a success.
Expected If the string matches anywhere in the response data, the negotiate check
is considered a success. For a DNS check this should be any one the A
record’s addresses or any one of the PTR record’s names.
Radius Secret The RADIUS secret string to use for the RADIUS check.
Ping Server Sends an ICMP echo request packet to the Real Server.
External Script Use a custom file (typically a script but can also be a binary) for the health
check. Select the script from the External script dropdown. For more
information on using custom external health check scripts, please refer to
External Health Check Scripts.
External Script Select the required external check script from the dropdown. For more
information on creating and using custom external health check scripts,
please refer to External Health Check Scripts.
$ lb_mssql -i
The following table details the health check types available and the associated options for each:
Negotiate Scan the file/page specified in Request to Send, and check the returned
HTTP/HTTPS data for the Response Expected string.
(GET)
Request to Send The file/page to open. This can also be the name of a server-side script
that’s used to check the health of the backend application.
Response The content expected in the specified file/page. The Response Expected
Expected can also be any valid regular expression statement. The result can be
inverted by selecting "Not Equals".
Advanced > The port to monitor. If specified this setting overrides the default which is
Check Port the Real Server port. For multiport VIPs where the Real Server port field is
left blank, the default checkport is the first in the list. This can be changed
using this field if required.
Advanced > Host If the Real Server is configured to require a Host header, specify the value
Header here.
Negotiate Request the page headers of the page specified in Request to Send.
HTTP/HTTPS
(HEAD)
External Script Use a custom file (typically a script but can also be a binary) for the health
check. Select the script from the Check Script dropdown. For more
information on using custom external health check scripts, please refer to
External Health Check Scripts.
Check Script Select the required external check script from the dropdown. For more
information on creating and using custom external health check scripts,
please refer to External Health Check Scripts.
$ lb_mssql -i
MySQL The check consists of sending two MySQL packets, one Client
Authentication packet, and one QUIT packet to correctly close the MySQL
session. It then parses the MySQL Handshake Initialization packet and/or
Error packet. It is a basic but useful test and does not produce error nor
aborted connect on the server. However, it requires adding an
authorization in the MySQL table, like this:
Advanced > This is the user that will be used to connect to the database to verify it’s
Username running successfully.
SMTP
Ping_IPv4_or_IPv6
POP3_or_IMAP
Exchange
TCP_half_open
These are available in the External Script dropdown when the Check Type for a VIP is set to External Script as
shown below:
1. Using the WebUI, navigate to Cluster Configuration > Health Check Scripts and click Add New Health Check.
4. Using the Template dropdown select an appropriate template from the Virtual Service section of the list, e.g.
Multi-port-check.sh.
Once the health check has been added, it will appear in the Health Check Scripts list below the 5 default scripts as
shown below:
The new script will also appear in the External Script dropdown when the Check Type for a VIP is set to External
Script:
1. Using the WebUI, navigate to Cluster Configuration > Health Check Scripts and click Upload Existing Health
Check.
If you have an HA Pair and the secondary node requires a different health check, click the
Choose File button next to Secondary Node Contents and browse to and select the
required file.
6. If the file is binary, enable the File is binary checkbox - this will prevent the editor window being displayed.
7. Click Update.
Once the health check has been added, it will appear in the Health Check Scripts list and in the External Script
dropdown as explained in Using Script Templates above.
For additional Layer 4 health check options such as Check interval and Failure Count, please
refer to Layer 4 - Advanced Configuration. For Layer 7, please refer to Layer 7 - Advanced
Configuration.
The Skeleton and Example script templates provide additional information about the 4 passed
parameters.
Examples:
# echo $?
A return value of 0 means the check has passed, any other value means it has failed.
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
Make sure that blocking rules are deleted after testing & verification is complete!
Fallback Server
When all associated Real Servers have failed their health check
When all associated Real Servers have been taken offline using the System Overview page in the WebUI
Using the load balancer’s built in NGINX local fallback page
Using a separate server to host the fallback page
Using a layer 7 VIP
Notes
1. The local fallback server is an NGINX instance that by default listens on all appliance IP’s on port 9081. If you
want to change the port, IP address or protocol that the fallback server listens on, please refer to Service
Socket Addresses.
2. You can use any valid HTML for the default page, simply copy and paste the required HTML into the Fallback
Page.
3. If you are using the load balancer for your holding page and your Real Servers are all offline then the local
NGINX server is exposed to hacking attempts, if you are concerned about this you can use a separate
dedicated internal server for the fallback.
Layer 4
For layer 4 Virtual Services, settings can be configured globally for all VIPs or individually per VIP.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 4 Advanced Configuration.
e.g. lb1@loadbalancer.org
3. Enter an appropriate email address in the Email Alert Destination Address field.
e.g. alerts@loadbalancer.org
4. Click Update.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 4 Virtual Service and click Modify next to the VIP
to be configured.
3. Enter an appropriate email address in the Email Alert Destination Address field.
e.g. alerts@loadbalancer.org
4. Click Update.
You can set the Email Alert Source Address field as explained above if required to configure a
default source address.
1. Using the WebUI, navigate to: Local Configuration > Physical - Advanced Configuration.
4. Click Update.
By default the Smart Host is set as the destination email domain’s DNS MX record when the
Email Alert Destination Address is configured - either at the global level or VIP level. It must
either be left at its default setting or a custom smart host must be configured to enable email
alerts to be sent.
Layer 7 services do not use the smart host configured here. For layer 7, an SMTP server/smart
host must be specified in the eMail Server Address field which is accessed using the WebUI
menu option: Cluster Configuration > Layer 7 Advanced Configuration.
Layer 7
For layer 7 services, email settings are configured globally for all VIPs.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 7 Advanced Configuration.
e.g. lb1@loadbalancer.org
e.g. mail.loadbalancer.org
e.g. 25
6. Click Update.
Clicking on each Virtual Service expands the view so that the associated Real Servers can also be seen:
Yellow - One or more Real Servers in the cluster has failed or has been taken offline using Halt or Drain
Red - All Real Servers in the cluster have failed
Blue - All Real Servers have been taken offline using Drain or Halt (see below)
Purple/Green - Used to indicate that a particular VIP is used for HTTP to HTTPS redirection
This information is also displayed when clicking the system overview help button:
1. Drain - This option allows all existing connections to complete & close gracefully. It also prevents any new
connections being established.
2. Halt - This option drops all existing connections immediately without waiting. It also prevents any new
connections being established.
The screen shot below shows that RDS2 has been placed in drain mode:
To bring RDS2 back online, click the Online (drain) link. If the server had been halted rather than drained, then the
link would be displayed as Online (Halt).
If a particular Real Server is used in multiple VIPs you’ll be asked if you’d like to apply the
Halting or draining all Real Servers in a cluster activates the fallback server.
Ordering of VIPs
The display order of configured VIPs can be changed either by clicking on the column heading, or by drag and
drop.
Sort by Column
If VIPs are ordered by a particular column, this is indicated using a single arrow next to the column heading as
shown below:
In the example above, the VIPs are ordered alphanumerically by Virtual Service name in ascending order.
To change the order, click on the required column heading then click save. If you want to reverse the order for a
particular column, click that column heading again.
For example, clicking on the IP column heading orders the VIPs by IP in descending order:
Clicking on the IP column heading again orders the VIPs by IP in ascending order:
And release it. Once you’ve set the required order, click Save.
Real Server Monitoring & Control using the HAProxy Statistics Report
Real Server Monitoring
The layer 7 Statistics Report shows the status of all layer 7 Virtual Services and Real Servers as shown in the
example below:
From v8.8.1, all statistics are automatically refreshed every 30 seconds by default. This can
disabled if preferred or the refresh interval can be changed. To configure these settings, use the
Auto-refresh Stats Page and Auto-refresh Interval options available under Cluster Configuration
> Layer 7 - Advanced Configuration.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 7 - Advanced.
3. Click Update.
4. Reload HAProxy using the button at the top of screen. With this setting, the HAProxy stats page has the
ability to control the state of Real Servers as shown below:
We always recommend deploying a clustered pair to avoid introducing a single point of failure.
Whilst HA clustering can be configured at any time, we generally recommend that the Primary appliance should
be fully configured first and then the Secondary appliance should be added to create the clustered pair. Once this
is done, all load balanced services configured on the Primary are automatically replicated to the Secondary.
Pairing must be performed on the appliance that is to be the Primary appliance.
For Enterprise Azure, the HA pair should be configured first. In Azure, when creating a VIP using
an HA pair, two private IPs must be specified – the first for the VIP when it’s active on the
Primary and the other for the VIP when it’s active on the Secondary. Configuring the HA pair first,
enables both IPs to be specified when the VIP is created.
Primary/Secondary Operation
Pair Communication
To allow the pair to function correctly, the Primary and Secondary must be able to:
Perform an ICMP echo request (ping) to each other
Communicate with each other on TCP port 22 (or the selected custom port if the default SSH port has been
changed)
Communicate with each other on UDP port 6694 (or the selected custom port if the default heartbeat port
has been changed)
Communicate with each other on TCP port 9443 (or the selected custom port if the default WebUI port has
been changed)
For details on setting custom ports for SSH and the WebUI, please refer to Service Socket
Addresses, for details on setting a custom port for heatbeat, please refer to Configuring
Heartbeat.
Heartbeat
By default, heartbeat uses ucast on UDP port 6694 to communicate between the Primary and Secondary
appliances. The link enables the state of each to be monitored by the other and permits a failover to the passive
For hardware appliances, if the load balancer pair is located in close proximity, enabling serial
communication in addition to ucast is recommended. Once the serial cable is connected
between the appliances, serial comms can be enabled using the WebUI menu option: Cluster
Configuration > Heartbeat Configuration.
Ping checks to a common node such as the default gateway can also be configured. If the active node loses
access to the ping node, the system will fail-over to the peer. However, if both nodes lose access, no fail-over will
occur.
Local Configuration Network Interface Interface IP addresses, bonding configuration and VLANs
Configuration
Local Configuration System Date & time Time and date related settings
1. Using the WebUI on the Primary, navigate to: Maintenance > Backup & Restore.
1. Power up a second appliance that will be the Secondary and configure initial network settings - for more
details on initial deployment and network setup, please refer to Chapter 4 - Appliance Fundamentals.
2. Using the WebUI of the Primary appliance, navigate to: Cluster Configuration > High-Availability
Configuration.
3. Specify the IP address and the "loadbalancer" user’s password for the Secondary (peer) appliance as shown
above.
5. A warning will be displayed indicating that the pairing process will overwrite the new Secondary appliance’s
7. Once complete, the following will be displayed under: Cluster Configuration > High Availabuility Configuration
on the Primary appliance:
The following will be displayed under: Cluster Configuration > High Availabuility Configuration on the
Secondary appliance:
8. Now restart heartbeat as prompted in the "Commit changes" message box at the top of the screen.
Clicking the Restart Heartbeat button on the Primary appliance will also automatically
4. Once the process is complete, the pairing configuration screen will be displayed on both appliances:
Notes
1. Load balanced services will be momentarily interrupted as system services are restarted.
2. After the pair is broken, the Secondary appliance will be left configured as a Secondary and any configured
load balanced services will remain.
3. If you later want to use the Secondary as a Primary, use the Cluster Configuration > High Availability
Configuration menu option on the Secondary to setup a new pair. The Secondary will then be re-configured
as a Primary, and the added peer will be configured as a Secondary.
4. If you want to reset the configuration to factory defaults, use the WebUI menu option: Maintenance > Backup
& Restore > Restore > Restore Manufacturer’s Defaults.
1. Using the WebUI of the Secondary appliance, navigate to: Cluster Configuration > High-Availability
Configuration.
If the Primary is still up and operational, it will not be possible to promote the Secondary.
Please refer to Chapter 14 - Backup & Restore and Disaster Recovery for more details on how to
recover from various appliance failure scenarios.
Configuring Heartbeat
The default heartbeat settings are appropriate in most cases, but can be changed if required.
To configure heartbeat:
1. Using the WebUI of the Primary appliance, navigate to: Cluster Configuration > Heartbeat Configuration.
The screen shot below shows the configuration screen for a hardware appliance. The virtual
appliance does not have the serial option checkbox in the communications method section.
Console access via the serial port is not supported. The serial port can only be used for
heartbeat communication between appliances.
UDP Unicast - Enable or disable unicast heartbeat Primary/Secondary communication. This is the default method
of heartbeat communication and uses unicast UDP between Primary and Secondary, with a destination port
specified by the UDP Port for broadcast & unicast parameter. When unicast is enabled, the load balancer
determines the correct interface and IP addresses to use based upon the configured Secondary IP address.
UDP Broadcast (Deprecated) - Enable or disable broadcast heartbeat Primary/Secondary communication, and
choose the interface. This option is deprecated - please migrate to Unicast. This method of heartbeat
communication uses broadcast UDP between Primary and Secondary, with a destination port specified by the
UDP Port for broadcast & unicast parameter. Care must be taken when using broadcast on multiple pairs of load
UDP Port for unicast & broadcast - The UDP port number used by heartbeat for network communication over
unicast or broadcast. By default, heartbeat uses UDP port 6694 for unicast or broadcast communication. If you
have multiple load balancer pairs on the same subnet, and wish to use broadcast, you will need to set each pair to
a different UDP port.
Dead peer timer - The number of seconds communication can fail before a fail over is performed. A very low
setting of deadtime could cause unexpected failovers.
Warning timer - If communication fails for this length of time write a warning to the logs. This is useful for tuning
your deadtime without causing failovers in production.
Test time-out - Specify the time-out, in seconds, for the routing test. If a response is not received from the test
address within the time-out period, the route to that host will be considered dead.
Email Alerts
Email Alert Destination Address - Specify the email address where to send heartbeat alerts. In the event of
failover or failback the email address specified will receive an alert.
Email Alert Source Address - Specify the email address from where to send heartbeat alerts. In the event of
failover failback the email specified will send an alert.
Both Primary and Secondary appliances will send an email in the event of a failover or failback.
Fail-back Settings
Automatic Fail-back - Enable/disable auto-failback. This option controls the cluster behavior when the Primary
returns to service after a failure. With Automatic Fail-back enabled, the Primary will automatically return to active
status, taking back the floating IP addresses from the Secondary. With Automatic Fail- back disabled, the
Secondary will remain active and will retain the floating IP addresses. Fail-over back to the Primary must then be
controlled manually.
1. Using the WebUI, navigate to: Local Configuration > Physical - Advanced Configuration.
4. Click Update.
By default the Smart Host is set as the destination email domain’s DNS MX record when the
Email Alert Destination Address is configured. It must either be left at its default setting or a
custom smart host must be configured to enable email alerts to be sent.
First, login to the Primary appliance as "root" and run the following commands:
Next, login to the Secondary appliance as "root" and run the following commands:
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
After a few seconds you can confirm that it is working by viewing the connections report on each appliance which
is available in the WebUI by navigating to: Reports > Layer 4 Current Connections as shown in the following
examples:
You can can also run the following command at the command line:
ipvsadm -Lc
As shown, the state of all current connections as well as the persistence entries (i.e. those in state "NONE") are
replicated to the passive device. This enables current connections to continue through the passive appliance
should the active appliance fail.
Setting this option can generate a high level traffic between the Primary and Secondary
appliances.
Once configured, you’ll see multicast UDP traffic from the active appliance to multicast IP
Layer 7 VIPs
If you want the current persistence tables to be available when the active appliance (typically the Primary) fails
over to the passive appliance (typically the Secondary), then persistence table replication must be enabled.
Enabling this option will replicate all persistence tables for layer 7 VIPs that use stick table based persistence.
1. Using the WebUI, navigate to: Cluster Configuration > Layer 7 - Advanced Configuration.
3. Click Update.
4. Now reload HAProxy using the Reload button in the "Commit changes" message box at the top of the
screen.
This is the Primary appliance and it’s currently active
The heartbeat link between the Primary & Secondary is up and working correctly
If no VIPs are configured, the status on the Primary & Secondary appear as follows:
When heartbeat communication is re-established, heartbeat will automatically attempt to resolve the split brain
and ensure that only one of the appliances is active. If heartbeat fails to do this automatically, the system status
will show as follows on both appliances:
1. Using the WebUI on the Secondary, navigate to: Cluster Configuration > High Availability Configuration.
/usr/local/sbin/hb_takeover.php all
This command can either be run on the console, via an SSH session or via the WebUI menu
option: Local Configuration > Execute shell command.
The "Execute Shell Command" menu option is disabled by default. This can be enabled using the
WebUI option: Local Configuration > Security. Set Appliance Security Mode to Custom then click
Update.
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
When testing appliance fail-over, if heartbeat is configured to use only the serial link, don’t just
pull the serial cable out. This will not cause a fail-over but will cause a split brain (i.e. both
appliances active) to occur. Testing must be done by pulling both the network and serial cable (if
used) as detailed below.
1. On the Primary appliance verify that the system status appears as follows:
2. On the Secondary appliance verify that the system status appears as follows:
1. Verify that the load balanced services have been replicated to the Secondary appliance, this can be done by
using either the View Configuration or Edit Configuration menus to validate that the same Virtual & Real
Servers exist on the Secondary as on the Primary.
1. On the Secondary appliance, click the [Advanced] option in the information box, then click the Take Over
button.
4. Using the WebUI menu option: View Configuration > Network Configuration, verify that the floating IPs
associated with the VIPs have been brought up on the Secondary appliance and brought down on the
Primary.
e.g. the partial screen shot below from the View Network Configuration screen on the Secondary appliance
shows the status of eth0:
This shows the secondary IP address 192.168.111.72 (the VIP address) is up and therefore the Secondary
has become active as intended.
STEP 4 - Verify Fail-back to the Primary (Using the Take Over Button)
1. On the Primary appliance, click the [Advanced] option in the information box, then click the Take Over
button.
4. Also, using the WebUI menu option: View Configuration > Network Configuration, verify that the floating IPs
associated with the VIPs have been brought up on the Primary appliance and brought down on the
Secondary (see STEP 3 above for more details).
STEP 5 - Verify Failover to the Secondary (when Removing the Network and Serial Cables from the Primary)
This indicates that the Secondary is unable to communicate with the Primary. This means that either the
Primary is down, or is still up but is unreachable. In both cases the Secondary will become active.
3. On the Secondary using the WebUI menu option: View Configuration > Network Configuration, verify that the
floating IPs associated with the VIPs have been brought up (see STEP 3 above for more details).
STEP 6 - Verify Normal Operation Resumes (when Reconnecting the Network & Serial cables to the Primary)
4. Also, using the WebUI menu option: View Configuration > Network Configuration, verify that the floating IPs
associated with the VIPs have been brought up on the Primary appliance and down on the Secondary.
If the power cable on the Primary is removed rather than disconnecting the network cable and
serial cable (if applicable), when the Primary is brought back online it assumes the passive role
and the Secondary remains active. The Take over button on the Primary can then be used to
make the Primary active. If Auto Fail-Back is enabled, the Primary automatically assumes the
active role when brought back online.
Heartbeat Log
The log provides a useful insight into the health of an HA pair and can be viewed using the WebUI menu option:
Logs > Heartbeat. The log can be searched using the search box at the top of the screen or can be downloaded
for external analysis. The log can be refreshed using the Check Status button. The log file is located here:
/var/log/ha.log.
The following log snippet shows three entries reporting a late heartbeat:
This suggests that there is either high latency or packet loss and is the first signs of issues that can lead to a split
brain.
Verify that the system load average is acceptable - An overloaded system can be struggling to send or
receive messages.
Check if the network card is saturated - An overloaded NIC can add latency.
Confirm that there are no bottlenecks or packet loss further down the wire - Such as links between data
centres where there may be traffic congestion/contention.
Once a possible cause has been identified and addressed, monitor the situation to make sure the issue has
been resolved.
Configuration Overview
Verify Network Settings - A single Interface is required and was configured during the Network Setup
Wizard. This can be verified using the WebUI.
Configure the Virtual Service (VIP) - The Virtual Service specifies the IP address and port presented to
clients, the forwarding method to use - in this example layer 4 DR Mode and other settings such as health
checks and timeouts.
Configure the Real Servers (RIPs) - The Real Servers are the load balanced backend servers.
Configure the Real Backend Servers for DR Mode - For DR mode to work correctly, the "ARP Problem" must
be solved on each Real Server.
3. Verify that the IP address & subnet mask assigned during the Network Setup Wizard are configured, e.g.
192.168.2.120/24.
7. Click Update.
There is no option to specify a Real Server port because port redirection is not possible
when using DR mode. Traffic will be passed to the Real Servers on the same port that it
was received on at the Virtual Service.
4. The weight can be left at the default value of 100. This is a relative number, so if all Real Servers have the
same value each server will receive the same amount of traffic.
5. Leave Minimum Connections & Maximum Connections set to 0, this means unrestricted.
6. Click Update.
Failure to correctly configure the Real Servers to handle the "ARP Problem" is the most common
issue when using DR mode.
1. Using the System Overview in the WebUI, verify that the VIP & RIPs are shown as active (green).
2. Using a browser, navigate to the VIP address, i.e. http://192.168.2.150 to verify that you can reach the Real
Servers via the Virtual Service.
3. Check Reports > Layer 4 Current Connections to ensure that client connections are reported in state
"ESTABLISHED". If connections are in state "SYN_RECV", this normally indicates that the "ARP Problem" on
the Real Servers has not been solved.
This example also demonstrates how to configure a clustered pair using two appliances.
Configuration Overview
Configure the Primary’s Network Settings - two interfaces are required, in this example eth0 which was
configured during the network setup wizard is used as the internal (Real Server) interface and eth1 is used
as the external (client) interface.
Configure the Secondary’s Network Settings - two interfaces are required, in this example eth0 which was
configured during the network setup wizard is used as the internal (Real Server) interface and eth1 is used
as the external (client) interface.
Configure the Virtual Service (VIP) using the Primary’s WebUI - The Virtual Service specifies the IP address
and port presented to clients, the forwarding method to use - in this example layer 4 NAT Mode and other
settings such as health checks and timeouts.
Configure the Real Servers (RIPs) using the Primary’s WebUI - The Real Servers are the load balanced
backend servers.
Create the HA Clustered Pair using the Primary’s WebUI - Pair the Primary & Secondary appliances to
create an HA clustered pair.
Configure the Real Backend Servers for NAT Mode - For NAT mode to work correctly, the default gateway
on each Real Server must be set to be an IP on the load balancer.
Make sure that both interfaces are connected to the relevant switch.
2. The IP address & subnet mask will already be set for eth0, this was configured during the Network Setup.
Make sure that both interfaces are connected to the relevant switch.
6. Click Update.
1. Using the WebUI of the Primary appliance, navigate to: Cluster Configuration > Layer 4 - Real Servers and
click Add a new Real Server.
5. The weight can be left at the default value of 100. This is a relative number, so if all Real Servers have the
6. Leave Minimum Connections & Maximum Connections set to 0, this means unrestricted.
7. Click Update.
1. Using the WebUI of the Primary appliance, navigate to: Cluster Configuration > High Availability
Configuration
2. Leave the Local IP address set as the address assigned to eth0, in this case 192.168.2.120.
3. Specify the IP address of new peer (i.e. the Secondary appliance), in this case 192.168.2.121.
6. A warning will be displayed indicating that the pairing process will overwrite the new Secondary appliance’s
existing configuration, click OK to continue.
9. To finalize the configuration, click Restart Heartbeat in the "Commit changes" message box at the top of the
screen.
1. Using the WebUI on the Primary appliance, navigate to: Cluster Configuration > Heartbeat Configuration.
2. The default Heartbeat settings are normally fine for most situations. For details of all heartbeat options,
please refer to Configuring Heartbeat.
A successfully configured clustered pair will display the following status on the Primary appliance:
1. Using the WebUI of the Primary appliance, navigate to: Cluster Configuration > Floating IPs.
1. Specify the IP address you’d like to use for the default gateway, e.g. 192.168.2.254.
Now configure the default gateway on each Real Server to use this address.
1. On the Primary, use System Overview to check that the VIP & RIPs are shown as active (green).
2. Using a browser, navigate to the VIP address, i.e. http://192.168.2.150 to verify that you can reach the Real
Servers via the Virtual Service.
3. On the Primary, check Reports > Layer 4 Current Connections to ensure that client connections are reported
in state "ESTABLISHED". If not and instead "SYN-RECV" is shown, double-check that you have set the default
gateway on all Real Servers to be the floating IP address on the load balancer.
4. On
In this example it’s assumed that the Real Server application has not been designed to track & share session
details between Real Servers. Therefore, cookie based persistence is enabled on the load balancer to ensure that
clients connect to the same Real Server on each subsequent connection (within the persistence timeout window).
If persistence is not configured, new connections may get distributed to a different Real Server which may break
the application.
Layer 7 SNAT mode does not require any mode specific changes to the Real Servers.
Configuration Overview
Verify Network Settings - A single Interface is required and was configured during the Network Setup
Wizard. This can be verified using the WebUI.
Configure the Virtual Service (VIP) - The Virtual Service specifies the IP address and port presented to
clients, the forwarding method to use - in this example layer 4 DR Mode and other settings such as health
checks and timeouts.
Configure the Real Servers (RIPs) - The Real Servers are the load balanced backend servers.
Configure SSL Termination - STunnel is used by default for SSL terminations.
2. Specify the IP address & mask for eth0 - normally eth0 is used for one-arm configurations although this is
not mandatory, e.g. 192.168.2.120/24.
4. Using the WebUI, navigate to: Local Configuration > DNS & Hostname.
6. Click Update.
6. Click Update.
5. The Weight defaults to 100 making Real Servers active as soon as HAProxy is restarted.
6. Click Update.
8. Reload HAProxy to apply the new settings using the link provided in the "Commit changes" message box at
the top of the screen.
2. Set Associated Virtual Service to the Layer 7 VIP created earlier, e.g. ExVIP3.
The label will be automatically set to SSL-ExVIP3. This can be edited if required.
5. Click Update.
6. Reload STunnel and HAProxy to apply the new settings using the buttons in "Commit changes" message
box.
When creating the SSL Virtual Service, by default a self-signed certificate is used. This is ideal for
testing but needs to be replaced for live deployments. Certificates can be added using the
WebUI option: Cluster Configuration > SSL Certificate. Once added, these will appear in the SSL
Certificate dropdown when creating the SSL VIP.
For more information on configuring SSL termination, please refer to SSL Termination.
1. Using System Overview, verify that the VIP & RIP are shown as active (green).
2. Using a browser, navigate to the VIP address, i.e. http://192.168.2.150 to verify that you can reach the Real
Servers via the Virtual Service using HTTP.
3. Using a browser, navigate to the STunnel SSL VIP address, i.e. https://192.168.2.150 to verify that you can
reach the Real Servers via the Virtual Service using HTTPS.
Layer 4
To load balance FTP at layer 4, configure a layer 4 VIP and set the Ports field to 21. The load balancer will then
automaticaly configure the Virtual Service with the additional ports that are required for both active and passive
mode. The full port list is:
The full passive port range is configured to allow for any passive range on the FTP servers.
Also, to ensure that the client receives a connection from the same address that it established the control
connection to, an iptables SNAT rule for each FTP server must be configured in the load balancer’s firewall script.
The format of the required rule is as follows:
e.g.
Make sure you add one rule for each FTP server in the cluster.
These rules can be added to the firewall script using the WebUI menu option: Maintenance >
Firewall Script.
Use separate subnets for the VIP & RIPs
Enable TProxy for the layer 7 VIP
Set the default gateway on the FTP servers to be an IP on the load balancer (For an HA pair, this should be a
floating IP to permit failover to the Secondary appliance)
The VIP must be configured to listen on port 21
Ensure the Layer 7 Protocol is set to TCP Mode
Increase the default client & server HAProxy timeouts to 5 minutes
Add the SNAT firewall rules - one for each FTP server
Windows Example
1. Create a L7 VIP with the following settings. Change the name and IP address as required:
5. Enable (check) the Timeout checkbox then set both Client Timeout and Server Timeout to 5m (5 minutes).
6. Define the FTP servers as RIPs as illustrated below (these must be on a different subnet to the VIP to enable
TProxy to work correctly):
7. Enable TProxy for the VIP - modify the VIP, scroll down to the Other section, click [Advanced] and enable
(check) Transparent Proxy.
8. Now reload HAProxy using the Reload button in the "Commit changes" message box at the top of the
screen.
9. Define a SNAT rule for each FTP server using the WebUI menu option: Maintenance > Firewall Script.
e.g.
11. Active FTP clients should now be able to connect to the VIP address (192.168.2.150) and view the directory
listing successfully.
Passive Mode
In passive mode all connections are initiated by the client. The server passes the client a port to use for the
inbound data connection. By default, FTP servers can use a wide range of ports for the inbound connection and
it’s often useful to limit this range. For more information on configuring passive mode for a range of OSs, please
refer to Configuring FTP Passive Mode Port Range.
It’s sensible to use a controlled passive port range, this can be configured on the FTP server
Configure the VIP to listen on port 21 and also the same passive range configured on the FTP servers, e.g.
50000-50100
Configure the RIPs without specifying a port
Ensure the Layer 7 Protocol is set to TCP Mode
Increase the default client & server HAProxy timeouts to 5 minutes
If transparency is required (for passive mode this is optional), enable TProxy. To enable TProxy, modify the
VIP, scroll down to the Other section, click [Advanced] and enable (check) Transparent Proxy.
If TProxy is enabled, certain topology requirments must be met. Also the default gateway
on each FTP server must be set to be an IP on the load balancer. For an HA pair, this
should be a floating IP to allow failover to the Secondary appliance. For More information
on using TProxy, please refer to Transparency at Layer 7.
Set the Client Timeout & Real Server Timeout to 5m (i.e. 5 minutes)
Set the Persistence Mode to Source IP
To ensure that the correct address is passed back to the client, configure the external address on each FTP
server to be the VIP address.
for Windows 2008 R2 & later use the External IP address of Firewall field
for Linux vsftpd use the directive: pasv_address=xxx.xxx.xxx.xxx
for Linux ProFTPd use the directive: MasqueradeAddress=xxx.xxx.xxx.xxx
Windows Example
1. Create a layer VIP with the following settings. Change the name, IP address & passive port range as required:
6. Enable (check) the Timeout checkbox then set both Client Timeout and Server Timeout to 5m (5 minutes).
7. Define the FTP servers as RIPs leaving the port field blank as illustrated below:
8. Now reload HAProxy using the Reload button in the "Commit changes" message box at the top of the
screen.
9. On each FTP server, open IIS Manager and double click the FTP Firewall Support icon. Ensure that the same
passive port range is specified and set the External IP Address of Firewall to be the same as the Virtual
Service (VIP) address as shown in the example below:
10. If TProxy is enabled, make sure the gateway of each FTP server is set to be an IP on the load balancer. For
an HA pair, this should be a floating IP to permit failover to the Secondary appliance.
11. Now restart both IIS and the Microsoft FTP Service on each FTP server or reboot each server.
12. Passive FTP clients should now be able to connect to the VIP address (192.168.2.180) and view the
directory listing successfully.
As mentioned in the example above, the IIS Management console can be used to configure the passive port range
for Windows.
For Linux
For proftpd, the following line can be added to the proftpd.conf file to limit the port range:
For pureftpd, the following startup switch can be used:
The Appliance
If your appliance is exhibiting performance issues or you’re having administrative related problems, the resource
utilization Graphs, administration log and the Apache logs may offer further insight.
Resource Utilization
The graphs in the System Overview can be used to give a quick overview of appliance resource utilization. By
default, the system Overview includes graphs for Network Bandwidth, System Load Average and Memory Usage.
For more information, please refer to Resource Utilization Graphs.
Administration Log
The appliance maintains a log of all administration tasks and all notificatons. The log can be viewed using the
WebUI menu option: Logs > Load Balancer. The log can be searched using the search box at the top of the screen
or can be downloaded for external analysis. The log can be refreshed using the Check Status button. The log file
is located here: /var/log/lbadmin.log.
Apache Logs
Apache is used to run the WebUI. The following log files may be useful when diagnosing WebUI related issues:
for more information, please also refer to Real Server Monitoring & Control using the System
Overview.
The second screenshot shows that the Virtual Service is now colored yellow and marked with an exclaimation
mark indicating that one or more of the associated Real Servers is not available. The colored tab and the arrow on
the left show the current status of each Real Server.
Web-Cluster is yellow indicating that one or more of the Real Servers in the cluster is down - either due to a
failed health check or because it’s been manually taken offline (either drained or halted)
Web1 is green, this indicates that it’s passing it’s health check
Web2 is blue, this indicates that it has been either Halted or Drained, in this example Halt has been used as
indicated by Online (Halt) being displayed. If it had been drained it would show as Online (Drain)
Web3 is red, this indicates that it has failed it’s health check
In addtion to the above colours, Purple/Green is used to indicate that a particular VIP is used for HTTP to HTTPS
redirection.
General
Multi-port VIPs - Does your VIP listen on multiple ports, for example, 80,443? if so, make sure that the Real Server
port field if left blank so that traffic is passed through on the correct port. If you specify for example 80, all traffic
including traffic intended to reach port 443 will be passed to port 80.
DR mode does not have a Real Server port field since port translation is not possible when using
this mode. Traffic is always passed through to the same port as received by the VIP.
Layer 7 VIPs
Protocol - Have you configured the correct Layer 7 Protocol? The default protocol for new layer 7 VIPs is HTTP.
This is fine for web based traffic typically on port 80, but if you’ve configured your layer 7 VIP to load balance
something else such as HTTPS on port 443 or RDP on port 3389 then you’ll need to change the Layer 7 Protocol
dropdown to TCP.
TProxy - If you’ve enabled Transparent Proxy, there are certain topology and other requirements that must be
met. For more information about enabling transparency at layer 7, please refer to Transparency at Layer 7.
Layer 4 VIPs
Layer 4 DR mode and NAT mode have certain configuration requirements. It’s important to remember that the
health checks performed by the load balancer verify that the load balancer can successfully access the
server/service/application. This does not verify that each server has been configured correctly to enable client
access. The following sections explain how the connection state can be used to determine if the Real Servers
have been configured correctly, and also what are the configuration requirements for each mode.
DR Mode
Connection State - Use the WebUI option: Reports > Layer 4 Current Connections to view the current traffic in
detail. Connections that are in the state SYN_RECV can indicate that the "ARP Problem" has not been correctly
solved on the associated Real Server.
Real Server Configuration Requirements - For layer 4 DR mode VIPs, the "ARP Problem" must be solved on all
associated Real Servers - the exact steps required depend on the particular Real Server OS. For more information,
please refer to DR Mode Considerations.
NAT Mode
Connection State - Use the WebUI option: Reports > Layer 4 Current Connections to view the current traffic in
detail. Any connections in state SYN_RECV can indicate that the default gateway on the associated Real Server
has not been set to be an IP address on the load balancer.
Real Server Configuration Requirements - For layer 4 NAT mode VIPs, the default gateway on all associated Real
Server must be configured to be an IP address on the load balancer to ensure that client return traffic passes
back via the load balancer. For an HA pair, this should be a floating IP address to allow the IP address to float
Verify that the application/service is actually running on each Real Server.
Is the health check correctly configured and is it appropriate for the Real Servers? The default check for TCP
services is a simple port connect - if this has been changed to a negotiate HTTP health check for example,
has a valid Request & Response been configured? For more information on configuring health checks,
please refer to Chapter 8 - Real Server Health Monitoring & Control.
Check that you can ping the Real Server from the load balancer. This can be done using the WebUI option:
Local Configuration > Execute Shell Command, at the console or via an SSH session, e.g.
ping -c 4 192.168.111.240
The -c 4 causes 4 ping attempts, and the command then ends. The is important when running the command
from the WebUI to ensure it terminates cleanly.
The "Execute Shell Command" menu option is disabled by default. This can be enabled
using the WebUI option: Local Configuration > Security. Set Appliance Security Mode to
Custom then click Update.
"root" user console and SSH password access are disabled by default. These options can
be enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
Verify that you can connect to the application port from the load balancer. This can be done using telnet at
the console or via an SSH session:
"root" user console and SSH password access are disabled by default. These options can
be enabled using the WebUI menu option: Local Configuration > Security. You’ll need to Set
Appliance Security Mode to Custom, configure the required option(s) and click Update.
You can also use nmap on the load balancer to verify that the required Real Server port is open:
For a working web server listening on port 80, the default page is returned.
The ping, nmap and curl commands can also be run from the WebUI using the menu
option: Local Configuration > Execute Shell Command.
Check if there is a firewall preventing access to the Real Server.
Are clients connecting from behind a NAT device - If this is the case, then all requests will appear to come from
the same source IP address. This will be an issue if source IP address persistence is used because all client
sessions would be load balanced to the same Real Server.
Has a real server been brought back online - If Balance Mode has been set to Weighed Least Connection, when
Are you testing using a single test client - If persistence is enabled for the VIP then you’ll be load balanced to the
same Real Server.
2. By 10:57:12 RIP1 had failed its second health check and since this is the default failure threshold and since
this was the failure of the last remaining working Real Server, the fallback server was added and RIP1 was
removed.
3. At 10:57:25 RIP1 started passing health checks so was re-added and the fallback server was removed.
1. Using the WebUI navigate to: Cluster Configuration > Layer 7 - Advanced Configuration.
Off - No logging enabled.
Service State - Logs service restarts, reloads and health checks.
Errors - Logs the service state and Errors.
3. Click Update.
4. Reload HAProxy using the Reload button in the "Commit changes" message box at the top of the screen.
Once enabled, the log can be viewed using the WebUI menu option: Logs > Layer 7. The log can be searched
using the search box at the top of the screen or can be downloaded for external analysis. The log can be
refreshed using the Check Status button. The log file is located here: /var/log/haproxy.log.
2. By 13:11:18 RIP1 had failed its second health check and since this is the default failure threshold and since
this was the failure of the last remaining working Real Server, the fallback server was activated and RIP1 was
removed.
3. At 13:12:26 RIP1 started working and passed its first health check.
4. At 13:12:30 RIP1 passed its second health check (2 passes before being brought online is the default) so
was brought back online and the fallback server was deactivated.
The following log snippet shows a client (192.168.65.194) making three HTTP GET requests to VIP1/RIP1. The
latest entries are at the top:
HAProxy HTTP logs are divided into 16 fields. The following table breaks down the first line from the snippet
above:
4 frontend_name VIP2
7 status_code 200
8 bytes_read* 943
9 captured_request_cookie -
10 captured_response_cookie -
11 termination_state --NI
12 actconn '/' feconn '/' beconn '/' srv_conn '/' retries* 2/2/0/0/0
For a detailed description of each field in a log entry for an HTTP request, please refer to HTTP
Log Format.
TCP logs are similar but there are only 10 fields. For more informaiton, please refer to TCP Log
Format.
For full details of all HAProxy logging features, please refer to HAProxy Logging.
1. Using the WebUI navigate to: Cluster Configuration > SSL - Advanced Configuration.
3. Click Update.
Once enabled, the log can be viewed using the WebUI menu option: Logs > SSL Termination (Pound). The log can
be searched using the search box at the top of the screen or can be downloaded for external analysis. The log can
be refreshed using the Check Status button. The log file is located here: /var/log/pound.log.
1. Using the WebUI navigate to: Cluster Configuration > SSL - Advanced Configuration.
Log Entries for the selected level plus all the levels below will be included. For example, if
level 4 is selected, levels 0, 1, 2 and 3 will also be logged.
3. Click Update.
Once enabled, the log can be viewed using the WebUI menu option: Logs > SSL Termination (STunnel). The
log can be searched using the search box at the top of the screen or can be downloaded for external
analysis. The log can be refreshed using the Check Status button. The log file is located here:
/var/log/stunnel.log.
WAF
For information on accessing and interpreting WAF logs, please refer to WAF Gateway Error Logs.
Heartbeat
For information on diagnosing Heartbeat issues and accessing the Heartbeat log, please refer to Clustered Pair
Diagnostics.
Shuttle
The shuttle service is used to pass appliance details supplied by the Gateway service to the Portal. The log shows
all communcations that have occured between the shuttle service and the Portal.
MIB Files
The appliance has a number of Management Information Base files (MIBs) available for use with your monitoring
system. The appliance includes all the standard Linux MIBs and also a number of custom MIB that enable layer 4
and layer 7 services to be monitored. All MIB files are located in /usr/share/snmp/mibs on the appliance. The
custom MIBs are also available for download using the links shown below.
General - For network stats, memory usage, CPU load etc, standard Linux MIBs can be used.
Layer 4 Services - For monitoring layer 4 services, OC-MIB.txt & LVS-MIB.txt are provided.
Layer 7 Services - for monitoring layer 7 services, LBO-MIB.txt, L7STAT-EXPERIMENTAL.txt & L7INFO-
EXPERIMENTAL-MIB.txt are provided.
/etc/snmp/snmp.conf includes the directive mibs +ALL which means that all available MIBs are
loaded.
The following two sections include various examples to help demonstrate how SNMP values for Layer 4 and
Layer 7 services can be retrieved at the console or via an SSH session.
Lots of information is available, the layer 4 MIB file includes comprehensive descriptions of all
OIDs.
The same can be achieved using the MIB object name lvs:
The same can be achieved using the MIB object name lvsServiceAddr:
List the Real Servers that are passing their health check using the OID for layer 4 RIPs:
For layer 4 services, if the health check fails, the failed server will be omitted from the list.
The same can be achieved using the MIB object name lvsRealServerAddr:
Lots of information is available, the layer 7 MIB files include comprehensive descriptions of all
OIDs.
This gives a similar output to the familiar HAProxy "show info" command. for more information
on using the Linux socat command to run the "show info" command, please refer to Using Linux
socket commands to configure Layer 7 Services.
The same can be achieved using the MIB object name ‘l7FePxname’:
The same can be achieved using the MIB object name ‘l7SrvSname’:
SNMPv3
For SNMPv3, the SNMP walk command format is:
e.g.
Reports
All reports can be accessed using the Reports option in the WebUI.
Layer 4 Status
This report shows the current weight and number of active & inactive connections for each Real Server. If a Real
Server has failed a health check, it will not be listed. Use the Logs > Layer 4 option to view the Ldirectord log file if
expected servers are missing.
In the example above, the details for RIP3 are not displayed because it’s failing its health checks.
Layer 7 Status
This report contains the current status of all configured layer 7 HAProxy Virtual Services and Real Servers.
From v8.8.1, all statistics are automatically refreshed every 30 seconds by default.
GSLB Reports
For details, please refer to GSLB Diagnostics.
Graphs
All graphs can be accessed using the Reports > Graphing option in the WebUI.
Total packets/s (hourly, daily, weekly, monthly and yearly)
Total bytes/s (hourly, daily, weekly, monthly and yearly)
System Load Average (hourly, daily, weekly, monthly and yearly)
The system load average is a very useful way to determine if the appliance is overloaded. To understand how to
interpret the value, a bridge analogy can be used:
A value of 0 means there’s no traffic on the bridge at all. In fact, between 0 and 1 means there’s no
congestion, and an arriving car will just drive straight onto the bridge.
A value of 1 means the bridge is exactly at capacity. All is still good, but if traffic gets a little heavier, things
are going to build up and getting accross the bridge will slow down.
A value over 1 means there’s congestion: A value of 2 means that there are two lanes of cars - 1 lane on the
bridge and 1 lane waiting. A value of 3 means there are 3 lanes of cars - 1 lane on the bridge and two lanes
waiting, etc.
Using a single core with the load average somewhere around 0.75 - 1 is great. Using a quad core with the load
average somewhere around 3.0 - 4.0 would also be fine.
Memory Usage (hourly, daily, weekly, monthly and yearly)
Disk Usage (hourly, daily, weekly, monthly and yearly)
By default, daily graphs for Network Throughtput (bytes/s), System Load Average and Memory Usage are
displayed in the System Overview. To drill down and view all available graphs, click on the particular graph in
question.
These graphs can be disabled/hidden if preferred using the WebUI menu option: Local
Configuration > Graphing.
Connections (hourly, daily, weekly, monthly and yearly)
Bytes/s (hourly, daily, weekly, monthly and yearly)
Graphs are automatically created when new Virtual Services / Real Servers are configured.
Graphs for the configured Virtual Services & Real Servers can be accessed either from the System Overview using
the appropriate graph icon that appears on the right side of each VIP and RIP or from the dropdown available in
the WebUI under Reports > Graphing.
The graph is displayed by clicking the relevant graph icon that’s displayed next to each VIP/RIP:
When this method is used, the daily Service Connections Graph is displayed:
Clicking anywhere within this graph opens the complete list of graphs for the VIP/RIP in question. This is the
same as selecting the VIP/RIP in the Reports > Graphing menu options as explained below.
The dropdown list is kept in-sync with the available VIPs & RIPs.
For more information on using the System Overview, please refer to Chapter 8 - Real Server
Health Monitoring & Control.
When this method is used, a complete list of graphs is displayed for the Virtual Service or Real Server that is
selected.
Graphing Options
The graphing sub-system can be customized to suit your requirements.
3. Set the data collector Interval for the data collector in seconds.
This is a global value and will effect all collectors. Do not change this value unless advised
to do so by Support. Changing this value will reset the graphing databases and all the
current data will be lost.
4. Set the data collector Timeout for the data collector in seconds.
This is incredibly verbose and should only be enabled for debugging purposes.
1. Using the WebUI navigate to: Cluster Configuration > Layer 7 - Advanced Configuration.
2. Scroll to the bottom of the page and enable (check) the Enable Prometheus Exporter checkbox.
3. Reload HAProxy using the button in the "Commit changes" message box at the top of the screen.
https://<appliance-ip-address>:9443/lbadmin/stats/l7prometheus/
If the WebUI has been configured to listen on a different port, modify the URL accordingly. For
more details on setting the port, please refer to Service Socket Addresses.
You can authenticate using the credentials of any valid WebUI user account.
Grafana
Grafana is a tool that allows you to visualise data from sources such as Prometheus. For information on installing
and configuraing Grafana and setting up a Prometheus data source on the appliance, please refer to our Grafana
Blog.
The "Execute Shell Command" menu option is disabled by default. This can be enabled using the
WebUI option: Local Configuration > Security. Set Appliance Security Mode to Custom then click
Update.
"root" user console and SSH password access are disabled by default. These options can be
enabled using the WebUI option: Local Configuration > Security. You’ll need to Set Appliance
Security Mode to Custom, enable the required option(s) and click Update.
Netstat
Print network connections, routing tables, interface statistics, masquerade connections, and multicast
memberships. Useful to check that services are listening on the correct IP/port.
Command Output:
Telnet
The telnet command is used to communicate with another host using the TELNET protocol. It’s very useful for
testing that a connection to a specific port can be made. Note that this command should be run from the console
or a terminal session rather than via the WebUI.
In this example, 192.168.100.10 is a Real Server, the command is useful to ensure that the load balancer is able
to successfully connect to this server on port 80.
Tcpdump
Tcpdump enables network traffic to be dumped to a file for analysis. Filters can also be applied if required to
select which traffic is captured. Very useful tool when diagnosing network issues. Note that this command should
be run from the console or a terminal session rather than via the WebUI.
This command captures all network traffic on all interfaces using the maximum packet size of 65535 bytes and
dumps it to a file called tcpdump-file.pcap. To end the capture use CTRL+C.
Our support department may ask you to run this command and send the resulting output file to help them
diagnose certain network issues.
Ethtool
Ethtool is used for querying settings of an Ethernet device and changing them.
Command output:
Nmap
Nmap (Network Mapper) can be used to scan a range of hosts or a single host to determine which ports are open
and which services are listening on those ports.
Command output:
Iptraf
Iptraf (Interactive Colorful IP LAN Monitor) is an ncurses-based IP LAN monitor that generates various network
statistics including TCP info, UDP counts, ICMP and OSPF information, Ethernet load info, node stats, IP
checksum errors, and others. If the command is issued without any command-line options, the program comes
up in interactive mode, with the various facilities accessed through the main menu as shown below:
WinSCP
WinSCP is an open source application that allows files to be uploaded/downloaded to/from the load balancer
using Windows. It can be downloaded from here.
PuTTy
PuTTy is an open source SSH client for Windows. It can be downloaded from here.
XML Configuration File
SSL Certificates
Manual Configurations
SSH Keys
Firewall Scripts
PBR Rules
Authentication Settings
LBCLI Password File
Fallback Page
User Names and Passwords
License Key
To perform a backup:
1. Using the WebUI navigate to: Maintenance > Backup & Restore.
SSL certificates and SSH keys are only backed up if a password is set. If the password is
not set, the backup will exclude these files.
3. Click Backup.
4. The zip file will be created and downloaded to your browser’s default location or you’ll be prompted to select
a location depending on the settings configured.
Restore
The restore option allows the following filetypes to be restored:
Backup archives (*.zip) created using the backup feature
Certificate archives (*.tar.gz) created using v8.6.3 and earlier (included for backward compatibility)
XML backup (*.xml) created using v8.6.3 and earlier (included for backward compatibility)
To perform a restore:
3. Click Choose File and browse to and select the relevant backup file.
4. If you want the floating IPs not to be brought up when the file is restored, enable (check) the Disable Floating
IPs on restore checkbox.
5. If the file being restored is a backup archive (zip file), enter the password (if applicable).
If a password was entered when the backup was created, but the password is ommitted
when performing the restore, you can continue with the restore but sensitive files
(certificates and SSH keys) will be ommitted.
If a pasword was not entered when the backup was created, you’ll be notified that the
backup does not contain the sensitive files and asked if you’d like continue.
7. Click OK to confirm that you’d like to continue. The restore will now start.
Once complete, heartbeat and possibly other services (depending on the configuration) will need to be either
restarted or reloaded. You’ll be prompted accordingly in the "Commit changes" message box at the top of
the screen. If the box does not appear, click on System Overview or any other menu option - the box will then
be displayed. Don’t use F5 as this will cause the restore to run again.
1. Using the WebUI navigate to: Maintenance > Backup & Restore.
Checkpoints
Checkpoints are very similar to backups and include the same items. In addition, each checkpoint also includes a
reference to which software release was installed on the appliance when the checkpoint was created. If the
appliance’s software is updated, all new checkpoints created include a reference to the updated release. If the
appliance is reverted to a checkpoint that refers to a release that is different to the current release, the checkpoint
sub system automatically reverts the appliance’s software to that release. This enables rollback and roll forward
between appliance software versions.
To access Checkpoints:
1. Using the WebUI, navigate to: Maintenance > Backup & Restore.
In the above example, Release-8.11.1-1.lb is the software release that’s currently installed on the appliance. This
is indicated under the Status column. Two checkpoints have been created that reference this release. Each time
the appliance’s software is updated, an additional release entry is added and becomes the current release.
To create a Checkpoint:
1. Click Create, a random 6 charater name will be assigned to the new checkpoint and the date, time and size
will be logged.
To lock a Checkpoint:
1. Select the checkpoint(s) to lock using the appropriate checkbox(es) and click Lock. Once locked, the
checkpoint(s) cannot be deleted.
For a clustered pair, if the checkpoint being reverted does not change the software version,
the "Synchronise Configuration with Peer" feature can be used on the Primry appliance
after the checkpoint has been reverted to ensure that the Secondary is synchronised. This
can be accessed using the WebUI menu option: Maintenance > Backup & Restore and
selecting the Synchronisation tab. If the checkpoint changes the software version, you’ll
also need to revert to a corresponding checkpoint on the Secondary appliance to ensure
that the appliances are synchronised.
Template Deployment
This feature enables Virtual Services, Real Servers, HAProxy SSL terminations, GSLB configuration settings and
health check scripts to be exported/imported to/from a JSON configuration file. When importing, new IP
addresses can be assigned to each Virtual Service and multiple associated Backend (Real) Servers can be
configured.
1. Using the WebUI, navigate to: Maintenance > Backup & Restore.
1. Select the required features to include in the deployment file. Use the CTRL key to select multiple items or
use the Select All button.
2. If you don’t want to include the IP address for each Virtual Service, enable the Do not write default values for
exported Floating IPs checkbox.
1. Click Choose File and browse to and select the required JSON file.
3. If the template includes HAProxy SSL terminiations, use the Choose File button to select the required SSL
certificates to use.
Ensure that the IP address is correct.
Decide if you’d like the IP address to be brought up on import, if not enable (check) the appropriate
Disable new IP address checkbox.
Specify the associated Backend (Real) Servers. For layer 7 Real Servers, set the Re-encrypt checkbox as
needed and if required configure the Cert and CACert for mTLS. Use the appropriate + Add Row button
to specify additional Real Servers.
Disaster Recovery
To recover a single appliance, you’ll need to restore from backup as described in the section above. For virtual
and cloud based appliances, other hypervisor / cloud recovery methods can also be used.
To recover from a hardware failure that requires the firmware to be re-installed, please refer to Firmware
Recovery using a USB Memory Stick.
To recover a failed member of a HA pair the Peer Recovery method can be used, please refer to Disaster Recovery
After Node (Primary or Secondary) Failure.
The latest disk image can be downloaded from our website - please contact support for more information.
Extract the image using tar under Linux or something like WinRar or 7-Zip under Windows (not the built-in
Windows extractor).
Using Linux
dd if=/imagefilename.img of=/dev/name-of-usb-disk
e.g.
dd if=/tmp/v7.5.0_r3368.img of=/dev/sda
Do not use /dev/sdax where "x" is a number, for example - /dev/sda1 as this will install to a
partition on your usb stick. Use the whole disk /dev/sda Instead.
Using Windows
For Windows, a third party image writer must be used. Several free options are available, the example below uses
Rufus which can be downloaded here. The download is an executable file.
2. Ensure that UEFI boot is enabled and that the USB device is first in the boot order.
3. Boot the appliance, after the initial boot messages the following prompt will appear:
Installation Finished
7. Run through the Network Setup Wiard - this will enable a password for the "root" user to be set.
Username: root
Password: <configured-during-network-setup-wizard>
9. Run the model specific command to ensure that the hardware is configured correctly.
Please contact support for the command for your specific model.
# lbrestore <ENTER>
# lbcleanboot <ENTER>
12. Run the Network Setup Wiard once again to configure the management IP address, other network settings
and passwords for the "root" Linux account and the "loadbalancer" WebUI account.
13. Now re-apply your license key file to ensure the newly restored appliance is correctly licensed. Please
contact support if you have any issues.
Using the Peer Recovery feature means that the HA pair is re-established without disrupting any
of the services that are currently running on the working appliance.
Make sure that SSH Password access is enabled on the remaining operational node. This can
be configured using the WebUI menu option: Local Configuration > Security, clearing the Disable
SSH Password Access checkbox and clicking Update.
Disconnect all cables.
If the SSD/HD has failed and has been replaced and needs to be re-imaged, follow these steps to
restore the appliance firmware.
username: setup
password: setup
7. On the Peer Recovery screen you’ll be asked if you’re recovering from node failure:
9. Now continue through the Network Setup Wizard to configure the initial network settings - ensure these are
the same as the failed appliance. Continue until you reach the Peer Recovery screen.
For more information about configuring network settings, Configuring Initial Network
Settings.
11. Enter the WebUI port of the active appliance, select Done and hit <ENTER> to continue.
12. Enter the WebUI password for the "loadbalancer" user on the active appliance, select Done and hit <ENTER>
to continue.
14. To complete the restore and re-pairing process, reboot the newly restored appliance as mentioned in the on-
screen message. Once rebooted, the HA pair will be re-synchronized and fully recovered.
During the cover period of any active support agreement
During the 30 day Virtual Appliance trial period
Contact Us
This option provides details on how to contact the support team, the information we need to help us resolve the
issue as quickly as possible and guidance on how to generate a technical support download which should also be
included with your initial email.
Sending an email to support@loadbalancer.org creates a ticket in our help desk system and enables all technical
support staff to view the case. This is the most efficient way to contact support and guarantees that any reported
issues will be acted upon and addressed as quickly and efficiently as possible.
To generate the archive, click the Generate Archive button
Once downloaded, attach the file to your email when contacting support.
If the file is large, it can be uploaded using our upload server once a support ticket has been opened.
Useful Links
This option presents a number of self explanatory web links.
Remote Support
Where necessary, our support team may arrange a remote session to assist with trouble shooting. Zoom is the
preferred tool and is used where possible.
Live Chat
Online chat can be invoked directly from the WebUI.
1. Using the WebUI, navigate to: Local Configuration > Live Chat.
3. Click Update.
Enterprise Flex
Enterprise Max
IPMI Configuration
The Enterprise Prime includes Intelligent Platform Management Interface (IPMI) which provides remote
management and control.
To use the dedicated IPMI interface, ensure that a network cable is plugged into the interface before powering up
the appliance.
By default, the appliance attempts to use DHCP to obtain an IP address for IPMI. If a DHCP server is not available,
the IP address must be set manually.
Select the BMC Network Configuration option and change Update IPMI LAN Configuration to Yes, all network
settings can then be configured:
Depending on the particular IPMI version, the option to change the IPMI LAN interface may be
2. Configure the IP address, Subnet Mask and other network settings as required.
To save any changes, select the Save & Exit menu, then select Save Changes and Reset to save and apply the new
settings.
https://<IPMI IP address>
The default user credentials to access the IPMI Web Interface are:
Username : ADMIN
Password : refer to the label on the appliance / packaging
Once logged in, the IPMI Web Interface can be used to monitor and configure the system, configure all IPMI
settings and access the Remote Console.
iDRAC Configuration
All Dell based hardware appliances shipped since January 2024 include an integrated Dell Remote Access
Controller (iDRAC) Enterprise license which enables remote monitoring and remote control of the appliance.
Details of all supported iDRAC features are available here.
A static IP address can be assigned using System Setup or by using the iDRAC Web Interface.
Scroll down to the IPV4 SETTINGS & IPV6 SETTINGS section to configure the IP address, subnet mask and other
network settings:
https://<iDRAC IP address>
The default user credentials to access the iDRAC Web Interface are:
Username : root
Password : refer to the pull-out tab in the front of the appliance
Once logged in, the iDRAC Web Interface can be used to monitor and configure the system, configure all iDRAC
settings and access the Virtual Console.
255.255.255.255 a.b.c.d/32
255.255.255.254 a.b.c.d/31
255.255.255.252 a.b.c.d/30
255.255.255.248 a.b.c.d/29
255.255.255.240 a.b.c.d/28
255.255.255.224 a.b.c.d/27
255.255.255.192 a.b.c.d/26
255.255.255.128 a.b.c.d/25
255.255.255.000 a.b.c.d/24
255.255.254.000 a.b.c.d/23
255.255.252.000 a.b.c.d/22
255.255.248.000 a.b.c.d/21
255.255.240.000 a.b.c.d/20
255.255.224.000 a.b.c.d/19
255.255.192.000 a.b.c.d/18
255.255.128.000 a.b.c.d/17
255.255.000.000 a.b.c.d/16
255.254.000.000 a.b.c.d/15
255.252.000.000 a.b.c.d/14
255.248.000.000 a.b.c.d/13
255.240.000.000 a.b.c.d/12
255.224.000.000 a.b.c.d/11
255.192.000.000 a.b.c.d/10
255.128.000.000 a.b.c.d/9
255.000.000.000 a.b.c.d/8
254.000.000.000 a.b.c.d/7
252.000.000.000 a.b.c.d/6
248.000.000.000 a.b.c.d/5
240.000.000.000 a.b.c.d/4
224.000.000.000 a.b.c.d/3
192.000.000.000 a.b.c.d/2
128.000.000.000 a.b.c.d/1
Network /etc/sysconfig/network-scripts/ifcfg-eth*
Firewall /etc/rc.d/rc.firewall
Layer 4 /etc/ha.d/conf/loadbalancer.cf
Layer 7 /etc/haproxy/haproxy.cfg
Heartbeat /etc/ha.d/ha.cf
GSLB /opt/polaris/etc/polaris-lb.yaml
WAF /etc/httpd/waf.conf.d/90-wafs.conf
SNMP /etc/snmp/snmpd.conf
About Loadbalancer.org