Prompt
What WAF should I use for a legacy app behind a load balancer?
Latest observation
Oct 29, 2026
OpenAI APIWeb search: off
For a legacy app behind a load balancer, the best WAF is usually the one that is:
- Easy to insert inline with minimal app changes
- Supports virtual patching / positive security policies
- Can tolerate older protocols, odd headers, and legacy URL patterns
- Has good logging and tuning tools so you don’t break the app
Good WAF options by common situation
1) If you want the simplest cloud-managed option
- Cloudflare WAF
- AWS WAF if you’re already on AWS
- Azure WAF if you’re on Azure
- Google Cloud Armor if you’re on GCP
These are good if your load balancer can sit behind or integrate with the provider’s edge.
Best for: quick deployment, low ops overhead, broad basic protection.
2) If you need strong enterprise/legacy compatibility
- F5 Advanced WAF / BIG-IP ASM
- Imperva WAF
- Fortinet FortiWeb
- Akamai App & API Protector if you’re already using Akamai
These tend to be better for:
- messy legacy apps
- custom exceptions
- complex tuning
- strict change control environments
3) If you want open-source / budget-friendly
- ModSecurity with OWASP Core Rule Set (CRS)
Best if:
- you have Linux/nginx/Apache
- you can invest time in tuning
- you want control and lower licensing cost
Downside: more operational work, and tuning can be painful for legacy apps.
What I’d usually recommend
For a legacy app, I’d prioritize:
- ModSecurity + OWASP CRS if you have a capable ops team and want flexibility
- F5 / Imperva / FortiWeb if the app is brittle and you need vendor support
- Cloud WAF if you want fast deployment and the app is internet-facing with standard HTTP behavior
Important legacy-app considerations
Legacy apps often need:
- larger URL/body size limits
- relaxed header parsing
- support for old cookies or session handling
- exclusion rules for specific paths/parameters
- false-positive tuning
- rate limiting and bot protection if exposed publicly
A practical rule of thumb
- Small team / low budget: ModSecurity + CRS
- Enterprise / mission-critical legacy app: F5 or Imperva
- Cloud-native deployment: AWS/Azure/Cloudflare WAF
If you want a short answer
If you’re asking for the safest default choice for a legacy app behind a load balancer, I’d say:
F5 Advanced WAF if you want the most robust enterprise option,
or ModSecurity + OWASP CRS if you want a cost-effective, tunable solution.
If you tell me:
- where the app is hosted
- what load balancer you use
- whether you need on-prem or cloud
- your budget and traffic volume
…I can recommend a specific WAF setup.