Loadbalancer.org WAF Gateway with Metaswitch EAS DSS/SSS

Similar documents
Load Balancing RSA Authentication Manager. Deployment Guide v Copyright Loadbalancer.org, Inc

Load Balancing Microsoft OCS Deployment Guide v Copyright Loadbalancer.org

Load Balancing Fujifilm SYNAPSE. Deployment Guide v Copyright Loadbalancer.org

Load Balancing Censornet USS Gateway. Deployment Guide v Copyright Loadbalancer.org

Load Balancing OKI DICOM-Embedded Printers. Deployment Guide v Copyright Loadbalancer.org

Load Balancing Bloxx Web Filter. Deployment Guide v Copyright Loadbalancer.org

Load Balancing Microsoft AD FS. Deployment Guide v Copyright Loadbalancer.org

Load Balancing Web Proxies / Filters / Gateways. Deployment Guide v Copyright Loadbalancer.org

Load Balancing VMware Horizon View. Deployment Guide v Copyright Loadbalancer.org, Inc

Load Balancing Microsoft Sharepoint 2010 / Deployment Guide v Copyright Loadbalancer.org, Inc

Load Balancing Microsoft AD FS. Deployment Guide v Copyright Loadbalancer.org, Inc

Load Balancing Nuance AutoStore. Deployment Guide v Copyright Loadbalancer.org

Load Balancing Microsoft 2012 DirectAccess. Deployment Guide v Copyright Loadbalancer.org, Inc

Copyright

Load Balancing Microsoft Terminal Services. Deployment Guide v Copyright Loadbalancer.org, Inc

Load Balancing Medical Imaging & Information System Protocols. Deployment Guide v Copyright Loadbalancer.org

Load Balancing Sage X3 ERP. Deployment Guide v Copyright Loadbalancer.org, Inc

OWASP TOP Release. Andy Willingham June 12, 2018 OWASP Cincinnati

Microsoft Sharepoint 2010 Deployment Guide

Load Balancing Microsoft IIS. Deployment Guide v Copyright Loadbalancer.org

Load Balancing Microsoft Remote Desktop Services. Deployment Guide v Copyright Loadbalancer.org, Inc

Load Balancing Web Servers with OWASP Top 10 WAF in Azure

Load Balancing Nginx Web Servers with OWASP Top 10 WAF in Azure

Load Balancing Web Servers with OWASP Top 10 WAF in AWS

Load Balancing Nginx Web Servers with OWASP Top 10 WAF in AWS

Load Balancing Microsoft IIS. Deployment Guide v Copyright Loadbalancer.org, Inc

OWASP Top 10. Copyright 2017 Ergon Informatik AG 2/13

Load Balancing Microsoft Remote Desktop Services. Deployment Guide v Copyright Loadbalancer.org

Enterprise Azure Quick Start Guide v8.3.0

Load Balancing Microsoft Lync 2010 / Deployment Guide v Copyright Loadbalancer.org

OWASP Top 10 The Ten Most Critical Web Application Security Risks

LB Cache Quick Start Guide v1.0

C1: Define Security Requirements

Load Balancing Microsoft Exchange Deployment Guide v Copyright Loadbalancer.org

Load Balancing Nuance Equitrac. Deployment Guide v Copyright Loadbalancer.org

OWASP TOP OWASP TOP

Introduction F rom a management perspective, application security is a difficult topic. Multiple parties within an organization are involved, as well

Load Balancing Microsoft Exchange Deployment Guide v Copyright Loadbalancer.org, Inc

Loadbalancer.org Virtual Appliance quick start guide v6.3

Aguascalientes Local Chapter. Kickoff

Load Balancing Microsoft Exchange Deployment Guide v Copyright Loadbalancer.org, Inc

Load Balancing Xerox Print Servers. Deployment Guide v Copyright Loadbalancer.org

Appliance Quick Start Guide v8.0

Appliance Quick Start Guide. v7.5

Load Balancing Microsoft Exchange Deployment Guide v Copyright Loadbalancer.org

Load Balancing Microsoft Skype For Business. Deployment Guide v Copyright Loadbalancer.org, Inc

Load Balancing Microsoft Exchange Deployment Guide v Copyright Loadbalancer.org, Inc

Loadbalancer.org. Loadbalancer.org appliance quick setup guide. v6.4

Load Balancing FreePBX / Asterisk in AWS

OPEN WEB APPLICATION SECURITY PROJECT OWASP TOP 10 VULNERABILITIES

Provide you with a quick introduction to web application security Increase you awareness and knowledge of security in general Show you that any

Solutions Business Manager Web Application Security Assessment

Appliance Quick Start Guide v8.1

Web Application Security. Philippe Bogaerts

SonicWall Web Application Firewall 2.0. AWS Deployment Guide

Appliance Quick Start Guide v7.1

Appliance Administration Manual. v7.2

NetScaler Analysis and Reporting. Goliath for NetScaler Installation Guide v4.0 For Deployment on VMware ESX/ESXi

Appliance Quick Start Guide v6.11

Appliance Quick Start Guide v8.0

HySecure Quick Start Guide. HySecure 5.0

Appliance Administration Manual. v7.1

TIBCO Cloud Integration Security Overview

SOLUTION BRIEF CA API MANAGEMENT. Enable and Protect Your Web Applications From OWASP Top Ten With CA API Management

Installing and Configuring VMware Identity Manager Connector (Windows) OCT 2018 VMware Identity Manager VMware Identity Manager 3.

The Balabit s Privileged Session Management 5 F5 Azure Reference Guide

Appliance Administration v6.6

Appliance Administration Manual. v6.17

Appliance Administration Manual v8.3.1

Appliance Administration Manual v8.3.0

Web Application Vulnerabilities: OWASP Top 10 Revisited

Pexip Infinity and Amazon Web Services Deployment Guide

Load Balancing Oracle Application Server

IPMI Configuration Guide

VMware Identity Manager Connector Installation and Configuration (Legacy Mode)

Ethical Hacking and Countermeasures: Web Applications, Second Edition. Chapter 3 Web Application Vulnerabilities

WatchGuard Dimension v2.1.1 Update 3 Release Notes

Appliance Quick Start Guide v7.1

Barracuda Web Application Firewall Foundation - WAF01. Lab Guide

DEFENSIVE PROGRAMMING. Lecture for EDA 263 Magnus Almgren Department of Computer Science and Engineering Chalmers University of Technology

W e b A p p l i c a t i o n S e c u r i t y : T h e D e v i l i s i n t h e D e t a i l s

Application Layer Security

Applications Security

Defend Your Web Applications Against the OWASP Top 10 Security Risks. Speaker Name, Job Title

Featuring. and. Göteborg. Ulf Larson Thursday, October 24, 13

CN!Express CX-6000 Single User Version PCI Compliance Status Version June 2005

Installing and Configuring vcloud Connector

Dell SonicWALL Secure Mobile Access 8.5. Web Application Firewall Feature Guide

Cisco Expressway Cluster Creation and Maintenance

Application Security through a Hacker s Eyes James Walden Northern Kentucky University

ForeScout Extended Module for ArcSight

Computer Forensics: Investigating Network Intrusions and Cyber Crime, 2nd Edition. Chapter 3 Investigating Web Attacks

CounterACT 7.0. Quick Installation Guide for a Single Virtual CounterACT Appliance

VMware Enterprise Systems Connector Installation and Configuration. JULY 2018 VMware Identity Manager 3.2 VMware Identity Manager VMware AirWatch 9.

VMware Tunnel Guide Deploying the VMware Tunnel for your AirWatch environment

Installing and Configuring vcenter Support Assistant

271 Waverley Oaks Rd. Telephone: Suite 206 Waltham, MA USA

Configure the Cisco DNA Center Appliance

CloudEdge Deployment Guide

Appliance Administration Manual. v6.7

Transcription:

Loadbalancer.org WAF Gateway with Metaswitch EAS DSS/SSS Deployment Guide v1.0.2 Copyright Loadbalancer.org

Table of Contents 1. Overview...4 Introduction to the WAF Gateway with Metaswitch EAS DSS/SSS...4 Virtualized Deployments... 4 Hardware Deployments... 4 2. About this Guide...4 3. Loadbalancer.org Appliances Supported...4 4. Loadbalancer.org Software Versions Supported...5 5. Metaswitch EAS DSS/SSS Versions Supported...5 6. Sizing, Capacity, and Performance for a Virtual WAF Gateway Deployment...5 7. Using Loadbalancer.org WAF Gateways with Metaswitch EAS DSS/SSS...6 Load Balancing & HA Requirements... 6 TLS/SSL Termination... 6 8. Deployment Concept...7 Virtual Service (VIP) Requirements... 7 9. Loadbalancer.org Appliance the Basics...8 Virtual Appliance Download & Deployment...8 Initial Network Configuration... 8 Accessing the Web User Interface (WebUI)...9 HA Clustered Pair Configuration... 10 10. Appliance Configuration for the WAF Gateway with Metaswitch EAS DSS/SSS...11 Overview... 11 Creating a WAF Gateway in Front of a Plain Text HTTP Service...11 Example: HTTP-80 Service... 11 Step 1: Creating the Layer 7 VIP... 11 Step 2: Creating the WAF Gateway... 12 Finalizing the Configuration... 13 Putting a WAF Gateway in Front of an Encrypted HTTPS Service...13 Example: HTTPS-10000 Service... 13 Step 1: Creating the Layer 7 VIP... 14 Step 2: Creating the WAF Gateway... 15 Step 3: Uploading the Certificate... 15 Step 4: Creating the TLS/SSL Termination...16 Finalizing the Configuration... 16 11. Custom WAF Rule Set Description...17 Whitelisted rules... 17 Rule 1: DOS Protection for login.html... 17 Rule 2: Detect Failed Login and Block... 17 Rule 3: DOS Protection POST to /login...18 Rule 4: Detect username abuse and block...18 Rule 5: Detect password abuse and block... 18 12. WAF OWASP Protection...19 OWASP Top 10 Application Security Risks: 2017...19 13. Testing & Verification...20

Metaswitch Specific Fail Over / High Availability Test...20 Using System Overview... 20 14. Technical Support...21 15. Further Documentation...21 16. Conclusion...21 17. Appendix...22 WAF Configurations and Rule Sets... 22 General Rule Set... 22 NAT Deployment Rule Set... 26 Clustered Pair Configuration Adding a Slave Unit...31 Company Contact Information... 33

Overview 1. Overview INTRODUCTION TO THE WAF GATEWAY WITH METASWITCH EAS DSS/SSS Metaswitch and Loadbalancer.org have a long-standing partnership for the implementation of EAS SSS. Whether deployed as hardware or virtualized, the Loadbalancer.org solution ensures EAS SSS is highly available and highly secure. The Loadbalancer.org appliance includes a fully integrated industry standard web application Firewall (WAF) by default. An off-the-shelf WAF is not very useful unless it is specifically configured to protect against the application. Loadbalancer.org have developed five custom WAF rules specifically to protect a Metaswitch EAS DSS/SSS deployment, ensuring total protection against security vulnerabilities. This is described in detail in this document. VIRTUALIZED DEPLOYMENTS In a virtualized environment, the Virtual EAS SSS deployment type used determines how the load balancer must be configured. It is essential to know which type of deployment is in place or being planned before attempting to set up a load balancer. In this scenario, the Loadbalancer.org solution should be used to provide both load balancing and protection against security vulnerabilities. HARDWARE DEPLOYMENTS Hardware installs follow a different deployment architecture. In this scenario, a separate pair of dedicated Loadbalancer.org appliances should be installed to provide protection against security vulnerabilities. Contact Loadbalancer.org for assistance with deploying a hardware WAF gateway solution. 2. About this Guide This guide details the steps required to configure a Loadbalancer.org appliance with WAF gateways in a Metaswitch EAS DSS/SSS environment utilizing Loadbalancer.org appliances. It covers the configuration of the Loadbalancer.org appliances and also any Metaswitch EAS DSS/SSS configuration changes that are required to enable deploying WAF gateways in front of the Metaswitch services. This guide is applicable to both hardware and virtual Metaswitch deployments. For more information about initial appliance deployment, network configuration and using the Web User Interface (WebUI), please also refer to the relevant Administration Manual: v7 Administration Manual v8 Administration Manual 3. Loadbalancer.org Appliances Supported All our products can be used for a WAF gateway with Metaswitch EAS DSS/SSS deployment. The complete list of models is shown below: Discontinued Models Current Models * Enterprise R16 Enterprise VA R16 Enterprise R20 Enterprise MAX Page 4

Loadbalancer.org Appliances Supported Enterprise VA Enterprise R320 Enterprise 10G Enterprise Ultra Enterprise VA R20 Enterprise VA MAX Enterprise AWS ** Enterprise AZURE ** * For full specifications of these models please refer to: http://www.loadbalancer.org/products/hardware ** Some features may not be supported, please check with Loadbalancer.org support 4. Loadbalancer.org Software Versions Supported V8.3.4 and later 5. Metaswitch EAS DSS/SSS Versions Supported Metaswitch EAS DSS/SSS all versions 6. Sizing, Capacity, and Performance for a Virtual WAF Gateway Deployment The Loadbalancer.org appliances can be deployed as virtual appliances. For deployments up to 250,000 subscribers, your virtual host should be allocated a minimum of 8 vcpus, 16 GB of RAM, and 8 GB of disk storage. This specification will support the following bandwidth and connection thresholds: Internet EAS bandwidth: 100 Mbit/s Internet EAS packets/s: 70,000 pkts/s EAS Internet bandwidth: 700 Mbit/s EAS Internet packets/s: 55,000 pkts/s Concurrent connections: 380,000 connections For larger deployments, your Metaswitch support representative will give you details of the expected load on your load balancers based on your predicted usage profile. Page 5

Using Loadbalancer.org WAF Gateways with Metaswitch EAS DSS/SSS 7. Using Loadbalancer.org WAF Gateways with Metaswitch EAS DSS/SSS Note: It's highly recommended that you have a working Metaswitch EAS DSS/SSS environment first before implementing the load balancer. LOAD BALANCING & HA REQUIREMENTS In addition to the WAF gateway functionality described in this document, Loadbalancer.org appliances can also be used to provide load balancing and high availability to Metaswitch EAS DSS/SSS deployments. For inquiries regarding hardware load balancer solutions, please contact your Metaswitch representative. For inquiries regarding virtual load balancer solutions, Loadbalancer.org can provide assistance and advice. Please contact us at solutions@loadbalancer.org. TLS/SSL TERMINATION A WAF gateway can only have plain text HTTP traffic passed into it for scanning. If HTTPS-based services are in use and need a WAF gateway placed in front of them then it is necessary to set up TLS/SSL terminating services on the load balancer to decrypt the HTTPS traffic. Full instructions on how to set this up are given in section Putting a WAF Gateway in Front of an Encrypted HTTPS Service on page 13. In the context of a Metaswitch EAS deployment, it is advised to ensure that traffic which is decrypted for scanning by a WAF gateway is re-encrypted before it is sent onward toward the Metaswitch EAS servers. Instructions on how to configure this option are also given in section Putting a WAF Gateway in Front of an Encrypted HTTPS Service. Page 6

Deployment Concept 8. Deployment Concept VIPs = Virtual IP Addresses Note: The load balancer can be deployed as a single unit, although Loadbalancer.org recommends a clustered pair for resilience & high availability. Please refer to section 2 in the appendix on page 31 for more details on configuring a clustered pair. VIRTUAL SERVICE (VIP) REQUIREMENTS To provide WAF gateway protection to a Metaswitch EAS DSS/SSS deployment, one chain of virtual services is required for each Metaswitch EAS service that needs to have a WAF gateway put in front of it. As an example, a Metaswitch EAS deployment that has three services on ports 80, 10000, and 10001 would require three chains of VIPs to be configured. Each chain must contain a layer 7 VIP, a WAF gateway, and optionally a TLS/SSL termination service (only required for HTTPS based services). Page 7

Loadbalancer.org Appliance the Basics 9. Loadbalancer.org Appliance the Basics VIRTUAL APPLIANCE DOWNLOAD & DEPLOYMENT A fully featured, fully supported 30 day trial is available if you are conducting a PoC (Proof of Concept) deployment. The VA is currently available for VMware, Virtual Box, Hyper-V, KVM and XEN and has been optimized for each Hypervisor. By default, the VA is allocated 1 CPU, 2GB of RAM and has an 8GB virtual disk. The Virtual Appliance can be downloaded here. Note: The same download is used for the licensed product, the only difference is that a license key file (supplied by our sales team when the product is purchased) must be applied using the appliance's WebUI. Note: Please refer to the Administration Manual and the ReadMe.txt text file included in the VA download for more detailed information on deploying the VA using various Hypervisors. INITIAL NETWORK CONFIGURATION The IP address, subnet mask, default gateway and DNS settings can be configured in several ways as detailed below: Method 1 - Using the Network Setup Wizard at the console After boot up, follow the instructions on the console to configure the IP address, subnet mask, default gateway and DNS settings. Method 2 - Using the WebUI Using a browser, connect to the WebUI on the default IP address/port: http://192.168.2.21:9080 To set the IP address & subnet mask, use: Local Configuration > Network Interface Configuration To set the default gateway, use: Local Configuration > Routing To configure DNS settings, use: Local Configuration > Hostname & DNS Method 3 - Using Linux commands At the console, set the initial IP address using the following command: ip addr add <IP address>/<mask> dev eth0 At the console, set the initial default gateway using the following command: route add default gw <IP address> <interface> At the console, set the DNS server using the following command: echo nameserver <IP address> >> /etc/resolv.conf Note: If method 3 is used, you must also configure these settings using the WebUI, otherwise the settings will be lost after a reboot. Page 8

Loadbalancer.org Appliance the Basics ACCESSING THE WEB USER INTERFACE (WEBUI) The WebUI can be accessed via HTTP at the following URL: http://192.168.2.21:9080/lbadmin * Note the port number 9080 The WebUI can be accessed via HTTPS at the following URL: https://192.168.2.21:9443/lbadmin * Note the port number 9443 (replace 192.168.2.21 with the IP address of your load balancer if it's been changed from the default) Login using the following credentials: Username: loadbalancer Password: loadbalancer Note: To change the password, use the WebUI menu option: Maintenance > Passwords. Once logged in, the WebUI will be displayed as shown on the following page: Page 9

Loadbalancer.org Appliance the Basics (shows v8.2.x) HA CLUSTERED PAIR CONFIGURATION Loadbalancer.org recommend that load balancer appliances are deployed in pairs for high availability. In this guide a single unit is deployed first, adding a secondary slave unit is covered in section 2 of the appendix on page 31. Page 10

Appliance Configuration for the WAF Gateway with Metaswitch EAS DSS/SSS 10. Appliance Configuration for the WAF Gateway with Metaswitch EAS DSS/SSS OVERVIEW For each service provided by the Metaswitch deployment that needs to be protected by putting a WAF gateway in front of it, up to three elements need to be created: TLS/SSL termination VIP (only required for services handling encrypted traffic, i.e. HTTPS) WAF gateway (always required) Layer 7 VIP (always required) CREATING A WAF GATEWAY IN FRONT OF A PLAIN TEXT HTTP SERVICE EXAMPLE: HTTP-80 SERVICE Consider an example plain text HTTP service, titled HTTP-80 in the pools.txt file on an EAS server. To protect this service with a WAF gateway, the following setup would be required: 1. WAF: scans the incoming plain text HTTP traffic and blocks malicious traffic 2. Layer 7 VIP: passes the scanned, safe traffic on toward the Metaswitch EAS deployment STEP 1: CREATING THE LAYER 7 VIP Configuring the Virtual Service (VIP) 1. Using the web user interface, navigate to Cluster Configuration > Layer 7 Virtual Services and click on Add a new Virtual Service 2. Define the Label for the virtual service as required, e.g. HTTP-80 3. Set the Virtual Service IP Address field to the required IP address, e.g. 172.31.5.20 Note: The IP address that is set here will be the address that clients will need to connect to in order to access this service via the WAF gateway. In the example presented here, the IP address 172.31.5.20 is used. This address is located in the untrusted external facing network in a Metaswitch EAS environment. If clients connect to a service using an FQDN, e.g. northwest-telco.com, then the DNS records will need to be updated to point to the new WAF protected IP address. Page 11

Appliance Configuration for the WAF Gateway with Metaswitch EAS DSS/SSS 4. Set the Ports field to the port that the service in question is listening on, e.g. 80 5. Set the Layer 7 Protocol to HTTP Mode 6. Click Update to create the virtual service Defining the Real Servers (RIPs) 1. Using the web user interface, navigate to Cluster Configuration > Layer 7 Real Servers and click on Add a new Real Server next to the newly created VIP 2. Define the Label for the real server as required, e.g. HTTP-80_Service 3. Set the Real Server IP Address field to the IP address that is used to access the service in question from the Metaswitch EAS deployment. In this example, the IP address used is 172.31.5.80 4. Set the Real Server Port field to the port that the service in question is listening on, e.g. 80 5. Click Update STEP 2: CREATING THE WAF GATEWAY 1. Using the web user interface, navigate to Cluster Configuration > WAF Gateway and click on Add a new WAF gateway 2. From the Select Layer 7 Virtual Service drop-down list select the associated layer 7 service that was created in step 1, which in this example is HTTP-80 3. Click Update to create the WAF gateway Page 12

Appliance Configuration for the WAF Gateway with Metaswitch EAS DSS/SSS 4. Navigate to Cluster Configuration > WAF Manual Configuration 5. Using the drop-down list, select the WAF gateway that was just created, e.g. WAF-HTTP-80. The existing default WAF configuration will appear in the text box 6. Paste your custom Metaswitch EAS WAF configuration into the text box Note: Two complete Metaswitch EAS WAF configurations, based on custom rule sets, are presented in Appendix 1: WAF Configurations and Rule Sets. Either of these configurations can be copy and pasted into the text box in their entirety. 7. Click Update to save the manual WAF configuration FINALIZING THE CONFIGURATION To apply the new settings, HAProxy and the WAF service must be restarted as follows: 1. Using the WebUI, navigate to: Maintenance > Restart Services and click Reload HAProxy 2. On the Restart Services page, click Reload WAF PUTTING A WAF GATEWAY IN FRONT OF AN ENCRYPTED HTTPS SERVICE EXAMPLE: HTTPS-10000 SERVICE Consider an example encrypted HTTPS service, titled HTTPS-10000 in the pools.txt file on an EAS server. To protect this service with a WAF gateway, the following setup would be required: 1. TLS/SSL Termination: decrypts the incoming HTTPS traffic so that the WAF can scan it in the next step. The appropriate certificate for the service is used to perform the decryption 2. WAF: scans the plain text HTTP traffic, and blocks malicious traffic 3. Layer 7 VIP: passes the scanned, safe traffic on toward the Metaswitch EAS deployment Page 13

Appliance Configuration for the WAF Gateway with Metaswitch EAS DSS/SSS STEP 1: CREATING THE LAYER 7 VIP Configuring the Virtual Service (VIP) 1. Using the web user interface, navigate to Cluster Configuration > Layer 7 Virtual Services and click on Add a new Virtual Service 2. Define the Label for the virtual service as required, e.g. HTTPS-10000 3. Set the Virtual Service IP Address field to the required IP address, e.g. 172.31.5.20 Note: The IP address that is set here will be the address that clients will need to connect to in order to access this service via the WAF gateway. In the example presented here, the IP address 172.31.5.20 is used. This address is located in the untrusted external facing network in a Metaswitch EAS environment. If clients connect to a service using an FQDN, e.g. northwest-telco.com, then the DNS records will need to be updated to point to the new WAF protected IP address. 4. Set the Ports field to a port that is free and not in use in the Metaswitch EAS environment. It is not possible to use the port that the service in question is actually listening on, as that port will be used for the termination service in step 4. The port chosen in this example is 20000 5. Set the Layer 7 Protocol to HTTP Mode 6. Click Update to create the virtual service 7. Click Modfiy next to the newly created VIP 8. Put a check in the Enable Backend Encryption checkbox 9. Click Update Defining the Real Servers (RIPs) 1. Using the web user interface, navigate to Cluster Configuration > Layer 7 Real Servers and click on Add a new Real Server next to the newly created VIP 2. Define the Label for the real server as required, e.g. HTTPS-10000_Service 3. Set the Real Server IP Address field to the IP address that is used to access the service in question from the Metaswitch EAS deployment. In this example, the IP address used is 172.31.5.80 Page 14

Appliance Configuration for the WAF Gateway with Metaswitch EAS DSS/SSS 4. Set the Real Server Port field to the port that the service in question is listening on, e.g. 10000 5. Click Update STEP 2: CREATING THE WAF GATEWAY 1. Using the web user interface, navigate to Cluster Configuration > WAF Gateway and click on Add a new WAF gateway 2. From the Select Layer 7 Virtual Service drop-down list, select the associated layer 7 service that was created in step 1, which in this example is HTTPS-10000 3. Click Update to create the WAF gateway 4. Navigate to Cluster Configuration > WAF Manual Configuration 5. Using the drop-down list, select the WAF gateway that was just created, e.g. WAF-HTTPS-10000. The existing default WAF configuration will appear in the text box 6. Paste your custom Metaswitch EAS WAF configuration into the text box Note: Two complete Metaswitch EAS WAF configurations, based on custom rule sets, are presented in Appendix 1: WAF Configurations and Rule Sets. Either of these configurations can be copy and pasted into the text box in their entirety. 7. Click Update to save the manual WAF configuration STEP 3: UPLOADING THE CERTIFICATE If the appropriate certificate for the service in question has not already been uploaded to the load balancer then this must be done for TLS/SSL termination to work on the load balancer. The process for doing this is Page 15

Appliance Configuration for the WAF Gateway with Metaswitch EAS DSS/SSS as follows: 1. Using the web user interface, navigate to Cluster Configuration > SSL Certificate and click on Add a new SSL Certificate 2. Press the Upload prepared PEM/PFX file radio button 3. Define the Label for the certificate as required. It may make sense to use the domain that the certificate is associated to, e.g. northwest-telco.com 4. Click on Browse and select the appropriate PEM or PFX style certificate 5. If uploading a PFX certificate, enter the certificate s password in the PFX File Password field 6. Click Upload certificate Further information on creating PEM files and converting between certificate formats is presented in our Administration Manual: http://pdfs.loadbalancer.org/loadbalanceradministrationv8.pdf STEP 4: CREATING THE TLS/SSL TERMINATION 1. Using the web user interface, navigate to Cluster Configuration > SSL Termination and click on Add a new Virtual Service 2. From the Associated Virtual Service drop-down list, select the associated WAF gateway that was created in step 2, which in this example is WAF-HTTPS-10000 3. Set the Virtual Service Port field to the port that the service in question is listening on, e.g. 10000 4. From the SSL Certificate drop-down list, select the certificate for the service in question, which in this example is northwest-telco.com 5. Click Update to create the TLS/SSL termination service FINALIZING THE CONFIGURATION To apply the new settings, HAProxy, the WAF service, and stunnel must be restarted as follows: 1. Using the WebUI, navigate to: Maintenance > Restart Services and click Reload HAProxy 2. On the Restart Services page, click Reload WAF 3. On the Restart Services page, click Reload STunnel Page 16

Custom WAF Rule Set Description 11. Custom WAF Rule Set Description Five custom WAF rules have been developed to protect a Metaswitch EAS DSS/SSS deployment. These rules are presented and described individually in the sections below. Two complete WAF rule sets are presented in their entirety at the end of this document: A rule set for use where users have unique IP addresses: the General Rule Set on page 22 A rule set for use where a significant proportion of users share the same IP address: the NAT Deployment Rule Set on page 26 WHITELISTED RULES To enable a Metaswitch EAS DSS/SSS deployment to work correctly with WAF gateways, it is necessary to whitelist some rules from the standard WAF OWASP ModSecurity core rule set (further details about this can be found in the WAF OWASP Protection section on page 19). The whitelisted rules prevent genuine, safe Metaswitch EAS traffic from being blocked. The set of whitelisted rules can be found at the top of each Metaswitch specific rule set. RULE 1: DOS PROTECTION FOR LOGIN.HTML This rule is not recommended for use in deployments where a significant proportion of users share the same IP address, such as where NAT is taking place at a firewall or router. The IP DOS for login forms. It records all access to login.html pages. Regardless of whether access is via a GET or a POST request method, any access to this URL will increment a counter. Increment counter "ip.dos_counter" per page hit If counter = 200+ set "ip.dos_block" = "1" which restricts access Both counters reset after 60s SecRule SCRIPT_FILENAME "@rx ^.*login.html$" \ "phase:5,chain,t:none,nolog,pass,id:5002010,severity:'info',tag:'dos', \ setvar:ip.dos_counter=+1,expirevar:ip.dos_counter=60" SecRule IP:dos_counter "@gt 200" "t:none,setvar:ip.dos_block, \ expirevar:ip.dos_block=60,setvar:ip.dos_counter=0" RULE 2: DETECT FAILED LOGIN AND BLOCK This rule is not recommended for use in deployments where a significant proportion of users share the same IP address, such as where NAT is taking place at a firewall or router. This is an aggressive rule to block actual failed logins. It detects the presence of either error=authenticationfailed or error=retrylimitexceeded in the response headers and increments a counter. Increment counter "ip.authfail-retrylimit_counter" per detected failed login If counter = 20+ set "ip.authfail-retrylimit_block" = "1" which restricts access ip.authfail-retrylimit_counter decrements 1 every 300s ip.authfail-retrylimit_block counter reset after 600s SecRule RESPONSE_HEADERS:Location "@contains error=authenticationfailed" \ "phase:5,id:5002020,chain,t:none,nolog,pass, \ setvar:ip.authfail-retrylimit_counter=+1,deprecatevar:ip.authfail-retrylimit_counter=1/300" SecRule ip:authfail-retrylimit_counter "@gt 20" "t:none,setvar:ip.authfailretrylimit_block=1, \ Page 17

Custom WAF Rule Set Description expirevar:ip.authfail-retrylimit_block=600,setvar:ip.authfail-retrylimit_counter=0" SecRule RESPONSE_HEADERS:Location "@contains error=retrylimitexceeded" \ "phase:5,id:5002021,chain,t:none,nolog,pass, \ setvar:ip.authfail-retrylimit_counter=+1,deprecatevar:ip.authfail-retrylimit_counter=1/300" SecRule ip:authfail-retrylimit_counter "@gt 20" "t:none,setvar:ip.authfailretrylimit_block=1, \ expirevar:ip.authfail-retrylimit_block=600,setvar:ip.authfail-retrylimit_counter=0" RULE 3: DOS PROTECTION POST TO /LOGIN This rule is not recommended for use in deployments where a significant proportion of users share the same IP address, such as where NAT is taking place at a firewall or router. This increments a counter per POST request to /login. This only considers POST requests. It should be far more aggressive and can be set much lower than the generic DOS block. Increment counter "ip.postreq_counter" per POST attempt If counter = 200+ set "ip.postreq_block" = "1" which restricts access ip.postreq_counter decrements 1 every 180s ip.postreq_block counter reset after 600s SecRule REQUEST_METHOD "^POST$" "phase:2,chain,t:none,nolog,pass, \ setvar:ip.postreq_counter=+1,deprecatevar:ip.postreq_counter=1/180,id:5002030" SecRule ip:postreq_counter "@gt 200" "t:none,setvar:ip.postreq_block=1, \ expirevar:ip.postreq_block=600,setvar:ip.postreq_counter=0" RULE 4: DETECT USERNAME ABUSE AND BLOCK This detects username based abuse. It detects when the same username is used in multiple POST requests and increments a counter. This rule is written so that it will only apply to IP addresses that have more than 2 login failures recorded against them from Rule 2: Detect Failed Login and Block. If counter authfail-retrylimit_counter > 2 (i.e. the IP address already has more than 2 failed logins against it) Increment counter "user.username_counter" per attempt using the same username If counter = 20+ set "user.username_block" = "1" which restricts access user.username_counter decrements 1 every 180s user.username_block counter reset after 600s SecRule REQUEST_METHOD "^POST$" "phase:2,chain,t:none,nolog,pass,id:5002040" SecRule ip:authfail-retrylimit_counter "@gt 2" "t:none,chain,setvar:user.username_counter=+1, \ deprecatevar:user.username_counter=1/180" SecRule user:username_counter "@gt 20" "t:none,setvar:user.username_block=1, \ expirevar:user.username_block=600,setvar:user.username_counter=0" RULE 5: DETECT PASSWORD ABUSE AND BLOCK This detects password based abuse. It detects when the same password is used in multiple POST requests and increment a counter. This rule is written so that it will only apply to IP addresses that have more than 2 login failures recorded against them from Rule 2: Detect Failed Login and Block. If counter authfail-retrylimit_counter > 2 (i.e. the IP address already has more than 2 failed logins against it) Page 18

Custom WAF Rule Set Description Increment counter "global.password_counter" per attempt using the same password If counter = 20+ set "global.password_block" = "1" which restricts access global.password_counter decrements 1 every 180s global.password_block counter reset after 600s SecRule REQUEST_METHOD "^POST$" "phase:2,chain,t:none,nolog,pass,id:5002050" SecRule ip:authfail-retrylimit_counter "@gt 2" "t:none,chain,setvar:global.password_counter=+1, \ deprecatevar:global.password_counter=1/180" SecRule global:password_counter "@gt 20" "t:none,setvar:global.password_block=1, \ expirevar:global.password_block=600,setvar:global.password_counter=0" 12. WAF OWASP Protection The WAF service included on Loadbalancer.org appliances is based on the ModSecurity open source project. The default vulnerability rule set is based on the OWASP Top 10 (Open Web Application Security Project Top 10). This defines ten areas of vulnerability that can affect web applications. These are summarized in the following section. OWASP TOP 10 APPLICATION SECURITY RISKS: 2017 Category A1 Injection A2 Broken Authentication A3 Sensitive Data Exposure A4 XML External Entities (XXE) A5 Broken Access Control A6 Security Misconfiguration Description Injection flaws, such as SQL, NoSQL, OS, and LDAP injection, occur when untrusted data is sent to an interpreter as part of a command or query. The attacker's hostile data can trick the interpreter into executing unintended commands or accessing data without proper authorization. Application functions related to authentication and session management are often implemented incorrectly, allowing attackers to compromise passwords, keys, or session tokens, or to exploit other implementation flaws to assume other users' identities temporarily or permanently. Many web applications and APIs do not properly protect sensitive data, such as financial, healthcare, and PII. Attackers may steal or modify such weakly protected data to conduct credit card fraud, identity theft, or other crimes. Sensitive data may be compromised without extra protection, such as encryption at rest or in transit, and requires special precautions when exchanged with the browser. Many older or poorly configured XML processors evaluate external entity references within XML documents. External entities can be used to disclose internal files using the file URI handler, internal file shares, internal port scanning, remote code execution, and denial of service attacks. Restrictions on what authenticated users are allowed to do are often not properly enforced. Attackers can exploit these flaws to access unauthorized functionality and/ or data, such as access other users' accounts, view sensitive files, modify other users' data, change access rights, etc. Security misconfiguration is the most commonly seen issue. This is commonly a result of insecure default configurations, incomplete or ad hoc configurations, open cloud storage, misconfigured HTTP headers, and verbose error messages containing sensitive information. Not only must all operating systems, frameworks, libraries, and Page 19

WAF OWASP Protection applications be securely configured, but they must be patched/upgraded in a timely fashion. A7 Cross-Site Scripting (XSS) A8 Insecure Deserialization A9 Using Components with Known Vulnerabilities A10 Insufficient Logging and Monitoring XSS flaws occur whenever an application includes untrusted data in a new web page without proper validation or escaping, or updates an existing web page with usersupplied data using a browser API that can create HTML or JavaScript. XSS allows attackers to execute scripts in the victim's browser which can hijack user sessions, deface web sites, or redirect the user to malicious sites. Insecure deserialization often leads to remote code execution. Even if deserialization flaws do not result in remote code execution, they can be used to perform attacks, including replay attacks, injection attacks, and privilege escalation attacks. Components, such as libraries, frameworks, and other software modules, run with the same privileges as the application. If a vulnerable component is exploited, such an attack can facilitate serious data loss or server takeover. Applications and APIs using components with known vulnerabilities may undermine application defenses and enable various attacks and impacts. Insufficient logging and monitoring, coupled with missing or ineffective integration with incident response, allows attackers to further attack systems, maintain persistence, pivot to more systems, and tamper, extract, or destroy data. Most breach studies show time to detect a breach is over 200 days, typically detected by external parties rather than internal processes or monitoring. 13. Testing & Verification METASWITCH SPECIFIC FAIL OVER / HIGH AVAILABILITY TEST This test is disruptive to end users and should not be run on a live production system. If using a highly available pair of load balancers, the fail over functionality between them can be tested. 1. Log into the CommPortal web interface through the WAF gateway protected IP address 2. Trigger a fail over from your active load balancer to your passive load balancer. You could force this by powering off the active load balancer 3. Press Ctrl+F5 in browser to force refresh the CommPortal page 4. Once a successful fail over has taken place, the passive load balancer will become active and will start serving traffic. The browser should show the CommPortal again. Note that a new log in may need to be performed following a fail over USING SYSTEM OVERVIEW The System Overview can be viewed in the WebUI. It shows a graphical view of all VIPs & RIPs (i.e. the EAS servers and WAF gateways) and shows the state/health of each server as well as the state of the each cluster as a whole. The example below shows that all EAS servers and WAF gateways are healthy and available to accept connections. Page 20

Testing & Verification 14. Technical Support For more details about configuring the appliance and assistance with designing your deployment please don't hesitate to contact the support team using the following email address: support@loadbalancer.org 15. Further Documentation The Administration Manual contains much more information about configuring and deploying the appliance. It's available here: http://pdfs.loadbalancer.org/loadbalanceradministrationv8.pdf 16. Conclusion Loadbalancer.org appliances provide a very cost effective solution for putting a highly available WAF gateway solution in front of Metaswitch EAS DSS/SSS environments. Page 21

Appendix 17. Appendix 1 WAF CONFIGURATIONS AND RULE SETS GENERAL RULE SET Note: Copy and pasting this rule set from this document will likely result in the loss of formatting, such as tabs and line breaks. The rule set can be downloaded as a text file from the following link, which will preserve all formatting: https://downloads.loadbalancer.org/metaswitch/metaswitch-waf_generalruleset.txt ----------------------------------------------------------------------------- Metaswitch Custom WAF Gateway Rule Set General Rule Set v1.1 (October 2018) ----------------------------------------------------------------------------- -- Whitelisted rules -------------------------------------------------------- These rules must be whitelisted to allow genuine Metaswitch connections to work <LocationMatch ^.*/login$> SecRuleRemoveById 950109 SecRuleRemoveById 981173 SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/login.html$> SecRuleRemoveById 960015 SecRuleRemoveById 970003 SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/main.html$> SecRuleRemoveById 960010 SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/home.html$> SecRuleRemoveById 970903 <LocationMatch ^.*/clientlog.gif$> SecRuleRemoveById 950109 Page 22

Appendix SecRuleRemoveById 960024 SecRuleRemoveById 981173 <LocationMatch ^.*/analytics.gif$> SecRuleRemoveById 960024 SecRuleRemoveById 973305 SecRuleRemoveById 973335 SecRuleRemoveById 973347 SecRuleRemoveById 981243 SecRuleRemoveById 981245 SecRuleRemoveById 981246 SecRuleRemoveById 981257 SecRuleRemoveById 950901 SecRuleRemoveById 973302 SecRuleRemoveById 973326 SecRuleRemoveById 973338 SecRuleRemoveById 981242 SecRuleRemoveById 981248 SecRuleRemoveById 981173 <LocationMatch ^.*/data$> SecRuleRemoveById 200004 SecRuleRemoveById 981173 SecRuleRemoveById 960024 SecRuleRemoveById 973347 SecRuleRemoveById 981243 SecRuleRemoveById 981245 SecRuleRemoveById 981246 SecRuleRemoveById 981257 SecRuleRemoveById 950109 SecRuleRemoveById 981231 SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/messages.html$> SecRuleRemoveById 970903 <LocationMatch ^.*/settings.html$> SecRuleRemoveById 970903 <LocationMatch ^.*/includes/scripts/loader.js$> SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/department/departments.html$> SecRuleRemoveById 970903 <LocationMatch ^/favicon.ico$> SecRuleRemoveById 981242 SecRuleRemoveById 981318 Page 23

Appendix -- Set the variables needed for checking ------------------------------------ Grab the variables that are needed for rule checking later on Rule IDs: 5,000,000-5,000,999 Check the source IP ADDRESS SecAction phase:1,nolog,pass,initcol:ip=%{remote_addr},id:5000000 Check the USERNAME being used SecAction phase:2,nolog,pass,initcol:user=%{args.directorynumber},id:5000010 Check the PASSWORD being used SecAction phase:2,nolog,pass,initcol:global=%{args.password},id:5000020 -- Blocking and logging rules ----------------------------------------------- These rules are responsible for implementing the blocks and writing to the log file Rule IDs: 5,001,000-5,001,999 -- Rule 1: DOS prottection for login.html (count page hits) SecRule ip:dos_block "@gt 0" \ "phase:2,block,status:401,log,id:5001010, \ setvar:tx.anomaly_score=+%{tx.critical_anomaly_score}, \ setvar:tx.%{rule.id}-customrule, \ msg:'metaswitch RULE 1: USERNAME %{ARGS.DirectoryNumber} is blocked due to high connection rate.'" -- Rule 2: Detect failed login and block SecRule ip:authfail-retrylimit_block "@gt 0" \ "phase:2,block,status:401,log,id:5001020, \ setvar:tx.anomaly_score=+%{tx.critical_anomaly_score}, \ setvar:tx.%{rule.id}-customrule, \ msg:'metaswitch RULE 2: USERNAME %{ARGS.DirectoryNumber} is BLOCKED for 10 minutes, more than 20 failed login attempts in 5 minutes.'" -- Rule 3: DOS proection POST requests to /login SecRule ip:postreq_block "@gt 0" \ "block,status:401,log,id:5001030, \ setvar:tx.anomaly_score=+%{tx.critical_anomaly_score}, \ setvar:tx.%{rule.id}-customrule, \ msg:'metaswitch RULE 3: IP ADDRESS %{REMOTE_ADDR} BLOCKED for 10 minutes, more than 200 login attempts in 5 minutes.'" -- Rule 4: Detect username abuse and block SecRule user:username_block "@gt 0" \ Page 24

Appendix "phase:2,deny,status:401,log,id:5001040, \ setvar:tx.anomaly_score=+%{tx.critical_anomaly_score}, \ setvar:tx.%{rule.id}-customrule, \ msg:'metaswitch RULE 4: USERNAME %{ARGS.DirectoryNumber} is BLOCKED for 10 minutes, more than 20 login attempts in 3 minutes.'" -- Rule 5: Detect password abuse and block SecRule global:password_block "@gt 0" \ "phase:2,deny,status:401,log,id:5001050, \ setvar:tx.anomaly_score=+%{tx.critical_anomaly_score}, \ setvar:tx.%{rule.id}-customrule, \ msg:'metaswitch RULE 5: USERNAME %{ARGS.DirectoryNumber} is BLOCKED for 10 minutes, more than 20 login attempts in 3 minutes.'" -- Detection rules ---------------------------------------------------------- These rules are responsible for the actual scanning and detection Rule IDs: 5,002,000-5,002,999 -- Rule 1: DOS prottection for login.html (count page hits) SecRule SCRIPT_FILENAME "@rx ^.*login.html$" \ "phase:5,chain,t:none,nolog,pass,id:5002010,severity:'info',tag:'dos', \ setvar:ip.dos_counter=+1,expirevar:ip.dos_counter=60" SecRule IP:dos_counter "@gt 200" "t:none,setvar:ip.dos_block, \ expirevar:ip.dos_block=60,setvar:ip.dos_counter=0" The following rules apply to a specific location <LocationMatch ^.*/login$> -- Rule 2a: Detect failed login and block (error=authenticationfailed) SecRule RESPONSE_HEADERS:Location "@contains error=authenticationfailed" \ "phase:5,id:5002020,chain,t:none,nolog,pass, \ setvar:ip.authfail-retrylimit_counter=+1,deprecatevar:ip.authfail-retrylimit_counter=1/300" SecRule ip:authfail-retrylimit_counter "@gt 20" "t:none,setvar:ip.authfailretrylimit_block=1, \ expirevar:ip.authfail-retrylimit_block=600,setvar:ip.authfail-retrylimit_counter=0" -- Rule 2b: Detect failed login and block (error=retrylimitexceeded) SecRule RESPONSE_HEADERS:Location "@contains error=retrylimitexceeded" \ "phase:5,id:5002021,chain,t:none,nolog,pass, \ setvar:ip.authfail-retrylimit_counter=+1,deprecatevar:ip.authfail-retrylimit_counter=1/300" SecRule ip:authfail-retrylimit_counter "@gt 20" "t:none,setvar:ip.authfailretrylimit_block=1, \ expirevar:ip.authfail-retrylimit_block=600,setvar:ip.authfail-retrylimit_counter=0" -- Rule 3: DOS proection POST requests to /login (count POST requests) SecRule REQUEST_METHOD "^POST$" "phase:2,chain,t:none,nolog,pass, \ setvar:ip.postreq_counter=+1,deprecatevar:ip.postreq_counter=1/180,id:5002030" Page 25

Appendix SecRule ip:postreq_counter "@gt 200" "t:none,setvar:ip.postreq_block=1, \ expirevar:ip.postreq_block=600,setvar:ip.postreq_counter=0" -- Rule 4: Detect username abuse and block SecRule REQUEST_METHOD "^POST$" "phase:2,chain,t:none,nolog,pass,id:5002040" SecRule ip:authfail-retrylimit_counter "@gt 2" "t:none,chain,setvar:user.username_counter=+1, \ deprecatevar:user.username_counter=1/180" SecRule user:username_counter "@gt 20" "t:none,setvar:user.username_block=1, \ expirevar:user.username_block=600,setvar:user.username_counter=0" -- Rule 5: Detect password abuse and block SecRule REQUEST_METHOD "^POST$" "phase:2,chain,t:none,nolog,pass,id:5002050" SecRule ip:authfail-retrylimit_counter "@gt 2" "t:none,chain,setvar:global.password_counter=+1, \ deprecatevar:global.password_counter=1/180" SecRule global:password_counter "@gt 20" "t:none,setvar:global.password_block=1, \ expirevar:global.password_block=600,setvar:global.password_counter=0" Close the location tag NAT DEPLOYMENT RULE SET Note: Copy and pasting this rule set from this document will likely result in the loss of formatting, such as tabs and line breaks. The rule set can be downloaded as a text file from the following link, which will preserve all formatting: https://downloads.loadbalancer.org/metaswitch/metaswitch-waf_natdeployment-ruleset.txt ----------------------------------------------------------------------------- Metaswitch Custom WAF Gateway Rule Set NAT Deployment Rule Set v1.1 (October 2018) ----------------------------------------------------------------------------- -- Whitelisted rules -------------------------------------------------------- These rules must be whitelisted to allow genuine Metaswitch connections to work <LocationMatch ^.*/login$> SecRuleRemoveById 950109 SecRuleRemoveById 981173 SecRuleRemoveById 981242 SecRuleRemoveById 981318 Page 26

Appendix <LocationMatch ^.*/login.html$> SecRuleRemoveById 960015 SecRuleRemoveById 970003 SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/main.html$> SecRuleRemoveById 960010 SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/home.html$> SecRuleRemoveById 970903 <LocationMatch ^.*/clientlog.gif$> SecRuleRemoveById 950109 SecRuleRemoveById 960024 SecRuleRemoveById 981173 <LocationMatch ^.*/analytics.gif$> SecRuleRemoveById 960024 SecRuleRemoveById 973305 SecRuleRemoveById 973335 SecRuleRemoveById 973347 SecRuleRemoveById 981243 SecRuleRemoveById 981245 SecRuleRemoveById 981246 SecRuleRemoveById 981257 SecRuleRemoveById 950901 SecRuleRemoveById 973302 SecRuleRemoveById 973326 SecRuleRemoveById 973338 SecRuleRemoveById 981242 SecRuleRemoveById 981248 SecRuleRemoveById 981173 <LocationMatch ^.*/data$> SecRuleRemoveById 200004 SecRuleRemoveById 981173 SecRuleRemoveById 960024 SecRuleRemoveById 973347 SecRuleRemoveById 981243 SecRuleRemoveById 981245 SecRuleRemoveById 981246 SecRuleRemoveById 981257 SecRuleRemoveById 950109 SecRuleRemoveById 981231 SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/messages.html$> Page 27

Appendix SecRuleRemoveById 970903 <LocationMatch ^.*/settings.html$> SecRuleRemoveById 970903 <LocationMatch ^.*/includes/scripts/loader.js$> SecRuleRemoveById 981242 SecRuleRemoveById 981318 <LocationMatch ^.*/department/departments.html$> SecRuleRemoveById 970903 <LocationMatch ^/favicon.ico$> SecRuleRemoveById 981242 SecRuleRemoveById 981318 -- Set the variables needed for checking ------------------------------------ Grab the variables that are needed for rule checking later on Rule IDs: 5,000,000-5,000,999 Check the source IP ADDRESS SecAction phase:1,nolog,pass,initcol:ip=%{remote_addr},id:5000000 Check the USERNAME being used SecAction phase:2,nolog,pass,initcol:user=%{args.directorynumber},id:5000010 Check the PASSWORD being used SecAction phase:2,nolog,pass,initcol:global=%{args.password},id:5000020 -- Blocking and logging rules ----------------------------------------------- These rules are responsible for implementing the blocks and writing to the log file Rule IDs: 5,001,000-5,001,999 -- Rule 4: Detect username abuse and block SecRule user:username_block "@gt 0" \ "phase:2,deny,status:401,log,id:5001040, \ setvar:tx.anomaly_score=+%{tx.critical_anomaly_score}, \ setvar:tx.%{rule.id}-customrule, \ msg:'metaswitch RULE 4: USERNAME %{ARGS.DirectoryNumber} is BLOCKED for 10 minutes, more than 20 login attempts in 3 minutes.'" Page 28

Appendix -- Rule 5: Detect password abuse and block SecRule global:password_block "@gt 0" \ "phase:2,deny,status:401,log,id:5001050, \ setvar:tx.anomaly_score=+%{tx.critical_anomaly_score}, \ setvar:tx.%{rule.id}-customrule, \ msg:'metaswitch RULE 5: USERNAME %{ARGS.DirectoryNumber} is BLOCKED for 10 minutes, more than 20 login attempts in 3 minutes.'" -- Detection rules ---------------------------------------------------------- These rules are responsible for the actual scanning and detection Rule IDs: 5,002,000-5,002,999 The following rules apply to a specific location <LocationMatch ^.*/login$> -- Rule 2a: Detect failed login and block (error=authenticationfailed) SecRule RESPONSE_HEADERS:Location "@contains error=authenticationfailed" \ "phase:5,id:5002020,chain,t:none,nolog,pass, \ setvar:ip.authfail-retrylimit_counter=+1,deprecatevar:ip.authfail-retrylimit_counter=1/300" SecRule ip:authfail-retrylimit_counter "@gt 20" "t:none,setvar:ip.authfailretrylimit_block=1, \ expirevar:ip.authfail-retrylimit_block=600,setvar:ip.authfail-retrylimit_counter=0" -- Rule 2b: Detect failed login and block (error=retrylimitexceeded) SecRule RESPONSE_HEADERS:Location "@contains error=retrylimitexceeded" \ "phase:5,id:5002021,chain,t:none,nolog,pass, \ setvar:ip.authfail-retrylimit_counter=+1,deprecatevar:ip.authfail-retrylimit_counter=1/300" SecRule ip:authfail-retrylimit_counter "@gt 20" "t:none,setvar:ip.authfailretrylimit_block=1, \ expirevar:ip.authfail-retrylimit_block=600,setvar:ip.authfail-retrylimit_counter=0" -- Rule 4: Detect username abuse and block SecRule REQUEST_METHOD "^POST$" "phase:2,chain,t:none,nolog,pass,id:5002040" SecRule ip:authfail-retrylimit_counter "@gt 2" "t:none,chain,setvar:user.username_counter=+1, \ deprecatevar:user.username_counter=1/180" SecRule user:username_counter "@gt 20" "t:none,setvar:user.username_block=1, \ expirevar:user.username_block=600,setvar:user.username_counter=0" -- Rule 5: Detect password abuse and block SecRule REQUEST_METHOD "^POST$" "phase:2,chain,t:none,nolog,pass,id:5002050" SecRule ip:authfail-retrylimit_counter "@gt 2" "t:none,chain,setvar:global.password_counter=+1, \ deprecatevar:global.password_counter=1/180" SecRule global:password_counter "@gt 20" "t:none,setvar:global.password_block=1, \ expirevar:global.password_block=600,setvar:global.password_counter=0" Page 29

Appendix Close the location tag Page 30

Appendix 2 CLUSTERED PAIR CONFIGURATION ADDING A SLAVE UNIT If you initially configured just the master unit and now need to add a slave - our recommended procedure, please refer to the relevant section below for more details: Note: A number of settings are not replicated as part of the master/slave pairing process and therefore must be manually configured on the slave appliance. These are listed below: Hostname & DNS settings Network settings including IP addresses, bonding configuration and VLANs Routing configuration including default gateways and static routes Date & time settings Physical Advanced Configuration settings including Internet Proxy IP address & port, Firewall table size, SMTP relay and Syslog server SNMP settings Graphing settings Firewall Script & Firewall Lockdown Script settings Software updates Version 7: Please refer to Chapter 8 Appliance Clustering for HA in the v7 Administration Manual. Version 8: To add a slave node i.e. create a highly available clustered pair: Deploy a second appliance that will be the slave and configure initial network settings Using the WebUI, navigate to: Cluster Configuration > High-Availability Configuration Page 31

Appendix Specify the IP address and the loadbalancer users password (the default is 'loadbalancer') for the slave (peer) appliance as shown above Click Add new node The pairing process now commences as shown below: Once complete, the following will be displayed: To finalize the configuration, restart heartbeat and any other services as prompted in the blue message box at the top of the screen Note: Clicking the Restart Heartbeat button on the master appliance will also automatically restart heartbeat on the slave appliance. Note: Please refer to chapter 9 Appliance Clustering for HA in the Administration Manual for more detailed information on configuring HA with 2 appliances. Page 32

Appendix 3 COMPANY CONTACT INFORMATION Website URL: www.loadbalancer.org North America (US) Loadbalancer.org, Inc. 4250 Lancaster Pike, Suite 120 Wilmington DE 19805 USA Tel: Fax: Email (sales): Email (support): +1 888.867.9504 +1 302.213.0122 sales@loadbalancer.org support@loadbalancer.org North America (Canada) Loadbalancer.org Ltd 300-422 Richards Street Vancouver, BC V6B 2Z4 Canada Tel: Fax: Email (sales): Email (support): +1 866.998.0508 +1 302.213.0122 sales@loadbalancer.org support@loadbalancer.org Europe (UK) Loadbalancer.org Ltd. Compass House North Harbour Business Park Portsmouth, PO6 4PS UK Tel: Fax: Email (sales): Email (support): +44 (0)330 3801064 +44 (0)870 4327672 sales@loadbalancer.org support@loadbalancer.org Europe (Germany) Loadbalancer.org GmbH Tengstraße 27 D-80798 München Germany Tel: Fax: Email (sales): Email (support): +49 (0)89 2000 2179 +49 (0)30 920 383 6495 vertrieb@loadbalancer.org support@loadbalancer.org Page 33