Dear community,
I'm trying to integrate an F5 WAF with FortiSandbox using ICAP on port 1344. The goal is to have the F5 WAF send PDF files to FortiSandbox for analysis.
I have configured both the F5 WAF and FortiSandbox accordingly, but ICAP connectivity is not working. I also attempted to telnet to the FortiSandbox IP (ICAP server) on port 1344, but the connection was refused (even though ping works fine).
My questions are:
Thank you in advance
Hi Salhi
Check this document.
https://docs.fortinet.com/document/fortisandbox/5.0.1/administration-guide/939729
Hope it helps.
Hi AEK
Thank you for your reply.
I already checked the Fortinet documentation but couldn't find the necessary information.
Advanced WAF module licensed
File Protection profile enabled
SSL interception if HTTPS is involved
FortiSandbox 4.0+ (with ICAP enabled)
Updated AV + sandbox engine
Network connectivity between F5 and FortiSandbox
Login to FortiSandbox Web UI
Go to:
System > Settings > File Scanning
Enable ICAP Server
Configure:
Port: 1344 (default)
Service Name: /icap/avscan (default or custom)
Allowed clients: Add F5 WAF IP
🟢 Note the service name (e.g. /icap/avscan) — you will use this on F5.
From another system:
You should see:
Navigate to:
Security > ICAP Services > ICAP Servers
Click Create
Fill in:
Name: FortiSandbox_ICAP
Host: <FortiSandbox-IP>
Port: 1344
URI Path: /icap/avscan
Preview Length: 0
Timeout: 5 or 10 seconds
Save and Test Connection.
Go to:
Security > ICAP Services > ICAP Services
Click Create
Fill in:
Name: FortiScan_Service
Request Adaptation: No
Response Adaptation: Yes
ICAP Server: FortiSandbox_ICAP
Service URI: /icap/avscan
Go to:
Security > Application Security > Security Policies
Choose your policy
Navigate to File Protection
Enable:
File types to scan (e.g. .doc, .pdf, .exe)
ICAP Service: FortiScan_Service
Save and Apply Policy
Upload EICAR test file through your app:
F5 will forward it to FortiSandbox
If malicious, F5 will block or return a modified response
FortiSandbox logs verdict in its UI
🧠 Best Practices
Task Recommendation
Enable SSL interception Needed if clients send over HTTPS
Set timeout on ICAP Avoid delay if sandbox is slow
Log FortiSandbox verdicts In FortiSandbox or via Syslog/SIEM
Monitor F5 logs For blocked uploads and ICAP errors
Keep AV/sandbox engine updated On FortiSandbox
:hammer_and_wrench: Optional: Advanced Tuning
Customize FortiSandbox to log, quarantine, or submit unknown files
Use F5 iRules to bypass ICAP for internal or trusted uploads
Use FortiSandbox APIs to fetch detailed reports for detected threats
:white_heavy_check_mark: Summary
Component Key Setting
FortiSandbox ICAP Enabled, URI /icap/avscan
F5 ICAP Server Host + Port + URI /icap/avscan
F5 Policy Enable File Protection
ICAP Mode Response Mode Only (for uploads)
iRule Example: Bypass ICAP for Trusted IPs or URIs
when HTTP_REQUEST {
set skip_icap 0
# Bypass ICAP for internal IPs
if {[IP::client_addr] starts_with "10."} {
set skip_icap 1
}
# Bypass ICAP for specific trusted upload path
if {[HTTP::uri] starts_with "/upload/trusted"} {
set skip_icap 1
}
# Check file extension (only scan specific types)
set uri_path [string tolower [HTTP::uri]]
if {![regexp {(\.exe|\.pdf|\.docx)$} $uri_path]} {
set skip_icap 1
}
# Disable ICAP adaptation if skipping
if {$skip_icap} {
ICAP::disable
log local0. "ICAP bypassed for [IP::client_addr], URI: [HTTP::uri]"
} else {
log local0. "ICAP enabled for [IP::client_addr], URI: [HTTP::uri]"
}
}
Logs
tail -f /var/log/ltm | grep ICAP
User | Count |
---|---|
2551 | |
1356 | |
795 | |
646 | |
455 |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.