Many South African organisations already own a web application firewall and are not using it. NetScaler WAF is included in the Advanced and Premium editions of NetScaler, so an appliance that fronts a Citrix Gateway, a customer portal or an API can inspect every HTTPS request as well as balancing it. It usually stays off for a reasonable reason: nobody wants to be the administrator who blocked the payroll portal at month-end. This is the sequence we use to avoid that.
Why monitor first, then block
NetScaler's deployment guide puts the order plainly: deploy in monitor-only mode, let a representative sample of traffic run through, deploy relaxation rules for the legitimate behaviour that gets flagged, and only then enable blocking. The setup wizard creates a profile, a policy and a signature object together, with the policy bound globally so every request is inspected from the start. With blocking disabled, the profile logs what it would have blocked and users notice nothing.
Two decisions come before the wizard:
- Which applications need which protection. Decide which need the most protection, which are less sensitive, and which can bypass inspection. Static content is the common bypass.
- Basic or advanced defaults. A basic profile starts with Start URL and Deny URL rules and detects common attacks such as buffer overflow, SQL injection and cross-site scripting. An advanced profile adds a positive security model that allows only specified data, tracks sessions, checks cookies and enforces form field rules. Advanced checks add processing overhead and some block caching, so choose per application. Basic protections are usually enough in the monitoring stage, and a profile can be changed later.
Step 1: turn on signatures and keep them current
Signatures are the pattern-matching half of the WAF. The default signature object carries more than 1,300 rules; copy it and modify the copy rather than edit the default. Signature auto update checks for a newer version every hour. The appliance needs DNS and a route to the internet, ideally through a proxy; an isolated appliance can use an internal mirror as the update URL. Two update behaviours matter for a rollout:
- A rule with the same ID and a newer version replaces the old one but keeps the existing action and enabled flag, so tuning survives the update.
- A rule with a new ID arrives with the action and enabled flag from the update file, which is why the documentation says to review updated signatures periodically and enable new rules deliberately.
Step 2: let learning build the relaxations
The learning engine is a repetitive pattern filter. It watches traffic to a protected application and suggests relaxations for the checks that support it, among them Start URL, Cookie Consistency, Field Formats, HTML SQL Injection and HTML Cross-Site Scripting. It records up to 2,000 suggestions per check in a database capped at 20 MB; at the cap, learning stops until the backlog is reviewed or reset.
Three settings decide how clean those suggestions are:
- Trusted learning clients. Learning can be restricted to a list of IP addresses or CIDR ranges. Use it. A WAF that learns from the whole internet learns the attackers' patterns too.
- Thresholds. The minimum threshold is the number of observations before a relaxation is suggested; the percent threshold is the share that must show the pattern. Both default to permissive values (1 and 0). The documentation's example raises SQL injection to 10 and 70 per cent; set something similar so one odd request does not become a rule.
- Where to learn. NetScaler recommends learning in a staging environment rather than production. Without one, the trusted client list and raised thresholds are the compensating controls.
Each suggestion can be deployed unchanged, edited and then deployed, or skipped. A deployed rule is not learned again; a skipped one may come back.
For more than one appliance, enable centralised learning (set appfw settings -centralizedLearning ON, on 13.0-76.6 or later) and review in NetScaler Console, where a learning profile groups WAF profiles and offers manual or automatic deployment. Keep it manual until the suggestions have stopped surprising you.
Step 3: enforce one check at a time
Each security check has its own block, log, statistics and learn actions, so blocking can be enabled check by check and application by application. The order we use:
- Signatures first, with blocking on for the high-confidence rules and logging for the rest.
- Then the injection and cross-site scripting checks, which produce few false positives once the relaxations are in place.
- Then Start URL and Deny URL.
- Then the positive-security checks (Field Formats, Form Field Consistency, Cookie Consistency, CSRF) on advanced profiles only, one at a time with a day or more between them.
Policy priority runs in reverse of the number: a priority-10 policy is evaluated before a priority-15 policy, so bind specific policies at a lower number and the generic catch-all below them. When a user reports a block, check ns.log for the violation first, then disable the feature briefly to rule it in or out.
A rollout checklist
- Confirm the edition: WAF needs Advanced or Premium.
- Copy the default signature object, enable auto update and set a review date for new rules.
- Create profiles with blocking off, basic defaults unless the application needs the positive model.
- Restrict learning to trusted clients, raise the thresholds and run long enough to see month-end traffic.
- Review every suggestion; deploy, tighten or skip, and clear the backlog before the 20 MB cap.
- Enable blocking one check at a time, reading
ns.logafter each change.
The WAF protects the applications behind the appliance, not the appliance itself, which still needs the patching in our guide to NetScaler vulnerabilities and the certificate hygiene in our article on 47-day TLS lifetimes. OAS runs the learn-to-enforce transition, signature reviews and ongoing tuning as part of its managed NetScaler service.
Sources
- NetScaler documentation: FAQs and Deployment Guide, NetScaler Web App Firewall
- NetScaler documentation: Configuring and using the Learning feature
- NetScaler documentation: Signature auto update
- NetScaler documentation: Creating Web App Firewall profiles
- NetScaler Console documentation: WAF learning
Turn a dormant WAF entitlement into enforced protection with NetScaler deployed and managed by OAS.
