FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
Umair54
Staff
Staff
Article Id 419927
Description This article describes the steps to troubleshoot and resolve slow website loading issues with FortiGate. The issue is characterized by slow loading times.
Scope FortiGate.
Solution

To troubleshoot and resolve a slow website loading issue with FortiGate involving ICAP server, follow these steps:

  1. Collect debug logs, sniffer outputs, and forward traffic logs to identify the root cause of the issue.
  2. Verify the firewall policy configuration and ensure that Application Control is enabled.
  3. Check for any packet drops or errors in the debug logs and sniffer outputs.
  4. Test the website loading speed with and without Application Control enabled to isolate the issue.
  5. If the issue persists, try disabling the traffic shaper and adjusting the bandwidth limits.
  6. Collect ICAP sniffer and debug logs to investigate any issues with the ICAP server.
  7. Verify the ICAP server configuration and ensure that it is reachable and responsive.
  8. If the issue is still not resolved, collect ICAP debugs as follows:
  9. Capture the output in the text file by following the steps outlined in Technical Tip: Troubleshooting ICAP Profile.

 

diagnose debug reset
diagnose debug console timestamp enable
diagnose wad debug enable category icap

diagnose wad debug enable category http <----- This command is optional for displaying HTTP debugging details.
diagnose wad debug enable level info
diagnose debug enable

 

Debug analysis:
 
wad_http_parse_host : host=google.com
canonicalize : path=/, len=1
wad_url_filter_local_request ... action=allow
wad_url_choose_cate : cate=41 (ftgd)
wad_url_filter_dump_result : type=req_http, action=ftgd-monitor
wad_http_icap_task_start
lb_server=Fortinet ... state=up conn_action=forward
wad_icap_proc ... switch/is_req: 0/1
task end ... good=1 ... processing=1
 
  1. Plain HTTP HEAD request to google.com.
  2. FTGD categorized it as 41 (exact textual name depends on FTGD database; often 'Search Engines/Portals' or something similar).

  3. Web filter action is monitor (no block), and ICAP task starts.

  4. WAD selects ICAP server Fortinet (up, forwarding).

  5. good=1 indicates the ICAP task completed successfully from WAD’s perspective.

  6. For HEAD, there is no body; REQMOD is typically headers-only (Encapsulated with null-body), or ICAP can be skipped depending on profile. Here, ICAP was invoked.

     

No errors or timeouts are shown for this transaction.

 

ICAP invocation and connection attempts:
 
wad_http_icap_task_start
lb_server=Fortinet... state=up ... forward
wad_icap_srv_conn_new ... ireq ... connecting
wad_icap_srv_conn_on_error ... (:0->10.10.10.1:1344): wad icap port cancel/error
icap_http_proc_conn_open : ERROR Fail to open icap port.
 
  1. WAD tries to connect to ICAP via the LB server Fortinet, which maps to 10.10.10.1:1344.
  2. Immediate connection error is identified -> 'Fail to open icap port'.
  3. WAD force closes the ICAP connection object.
  4. This indicates connectivity failure (TCP open failed, or a very fast cancel) toward the ICAP service port.

Troubleshooting steps:

  1. Verify immediate connectivity from FortiGate (same VDOM as the policy using ICAP).
  2. Verify ICAP service status on 10.10.10.1. Check logs for connection refusals or crashes.
  3. FortiGate ICAP profile sanity check by confirming ICAP service URI (server, port and service path) matches the ICAP server.
  4. If the design involves secure ICAP (ICAP/TLS), ensure that the FortiGate profile is configured accordingly and the server is listening on a TLS port, often it is not 1344.
  5. If the error is intermittent, check ICAP server connection limits, FDs, and maximum sessions.
  6. If the issue persists, try rebooting the ICAP server and verifying the website loading speed again.

Following these steps enables identification and resolution of the slow website loading issue with FortiGate.