Created on 10-25-2022 01:15 AM Edited on 12-13-2024 12:44 AM By Jean-Philippe_P
Description |
This article explains the possible reasons why FortiGate is unable to connect FortiGuard servers and offers steps to troubleshoot the problem.
The 'Unable to connect to FortiGuard servers' error message can be seen in two places:
|
Scope | FortiGate, FortiWeb. |
Solution |
The communication between FortiGate and FortiGuard for web filtering and antispam is different from the communication for antivirus and IPS.
execute ping service.fortiguard.net execute ping update.fortiguard.net execute ping guard.fortinet.net
If the DNS resolves, move to Step 2:
Check Antivirus & IPS Definition under System -> FortiGuard -> AntiVirus & IPS Updates -> Update AV and IPS Definitions.
Check Filtering Services under System -> FortiGuard -> Filtering.
Anycast servers: It is recommended to disable anycast and switch back to unicast servers.(Anycast communication)
config system fortiguard set fortiguard-anycast disable set protocol udp set port 8888 set sdns-server-ip 208.91.112.220 173.243.140.53 210.7.96.53 end
For FortiGuard's SDNS rating service, there are two modes in FortiOS:
Mode 1: Use of unicast network, which uses DNS over UDP protocol for FortiGate and FortiGuard transactions. Mode 2: Use of anycast network (default), which uses DNS over TLS protocol for FortiGate and FortiGuard transactions.
config system fortiguard set fortiguard-anycast disable set sdns-server-ip 208.91.112.220 173.243.140.53 210.7.96.53 end
config system fortiguard set fortiguard-anycast enable end
With Anycast, FortiGate is only aware of one single server IP. This is a floating IP address that will connect to the closest server geographically, and if this server is down, it will point to another server instead. With Unicast, the FortiGate must maintain a list of servers that it tries and if one stops working it then switches over to another.
In many cases, problems related to FortiGuard are caused by ISPs. Some ISPs block traffic on port 53 that is not DNS or that contains large packets. In those cases, the solution is to use port 8888.
Other ISPs block traffic to HTTPS port 8888. In those cases, the solution is to use UDP port 53.
Related port information:
Some debug commands for FortiGuard:
diagnose debug reset diagnose debug application update -1 diagnose debug enable
Force FortiGuard update after running debug application update -1:
execute update-now
The following command can also fix various issues with FortiGuard servers. In this example, 212.48.23.12 is used as the IP for the interface to the ISP router.
config system fortiguard set fortiguard-anycast disable set protocol udp set port 8888 set sdns-server-ip 208.91.112.220 173.243.140.53 210.7.96.53 set ddns-server-ip 173.243.138.225 set source-ip 212.48.23.12 end
config system dns
set primary 8.8.8.8
set source-ip 212.48.23.12
end
Source IP should match the IP address on the Wan port of FortiGate (ISP port), if Source IP is changed, DNS and FortiGuard settings should be changed as well.
Note:
Despite changing the FortiGuard settings to anycast disable and configuring UDP protocol to reach the FortiGuard servers, the connection still fails because the DNS servers will still use the 'DNS over TLS' settings which is a default setting, in this case, public IPs will be reachable, but DNS resolution fails.
Changing the DNS settings to use 'DNS over UDP' will help in resolving the domain names properly.
Note: Suppose connectivity to FortiGuard is required through one of the outgoing interfaces. In that case, it is possible to use 'interface-select-method' with the 'specify' action and then select the outgoing interface under the FortiGuard configuration. See Technical Tip: Functionality of 'set interface-select-method' for local-traffic with SD-WAN for more information.
config system fortiguard set interface-select-method {auto|sdwan|specify} set interface WAN Interface
diagnose debug application update -1 diagnose debug enable execute update-now
In this case, the output of the debugs looks like:
Try to use 'interface-select-method' with the 'specify' action and then select the outgoing interface under the FortiGuard configuration as mentioned above.
License errors may be found in two places as shown below:
diagnose debug application fds 7 diagnose debug enable
To disable the debug:
diagnose debug disable diagnose debug reset
FortiGuard licenses and the communication to FortiGuard are viewable via GUI through System -> FortiGuard as well as through the CLI using the following commands:
diagnose autoupdate versions
The output is quite long, but it is possible to pipe the output to grep:
diagnose autoupdate versions | grep -A6 "IPS Attack Engine"
diagnose debug rating
The Web Filter should be licensed:
Check the firewall policy. If there is no Web Filter Profile configured in the firewall policy, the web filter will be shown as disabled in the 'diag debug rating' output.
Note: If the error persists after applying changes, try accessing the same page in another browser or a private window, as the browser might be displaying a cached version of the page.
Related article: Technical Tip : FortiGuard Flags and Meaning |
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 2024 Fortinet, Inc. All Rights Reserved.