Debugging FortiGate Configurations
Debugging FortiGate Configurations
Solution
FortiGate units have built-in diagnose debug commands that can be used to debug the operation of any FortiGate
software system by displaying debug messages on the CLI console as the system operates. When you find the
problem you can correct the configuration and run the diagnose debug command again to verify that the system
now operates correctly.
Before performing any debugging, you should connect to the FortiGate CLI with a
terminal program that supports storing the output to a file for later reference. If you do
not save the output to a file, you will miss valuable debugging information.
Keep in mind that debugging consumes system resources and may affect performance.
In most cases this will not be a problem, but if your FortiGate unit is running at 100
percent resource usage already, it is likely that running the debug application will cause
the FortiGate unit to drop more packets or sessions, and generally increase its
overloaded behavior. The worst is when you are sniffing packets, which can use 10
percent or more of the system resources.
http://docs-legacy.fortinet.com/cb/html/index.html#page/FOS_Cookbook/Install_advanced/cb_ts_debug.html
1/4
04/12/2014
To use the diagnose debug commands you must check the current debug configuration, enable debugging,
select a software system for which to display debugging information, collect and analyze the results, and stop
displaying debugging information. In general you can follow this command sequence:
diagnose debug info
diagnose debug <software-system> <debug-level>
diagnose debug enable
diagnose debug disable
The following debug commands are also useful:
diagnose debug reset to reset the debug configuration to a default state.
diagnose debug report Fortinet support may ask you to run this command and send them the output.
This is an exhaustive report that runs many different diagnose commands to gather a
large amount of information. It may take up to 20 minutes to run on a FortiGate unit with
a complex configuration and may temporarily affect system performance.
2/4
04/12/2014
Debugging authentication
Any time a FortiGate unit authenticates a user, the authd daemon is responsible. This is true if the user is logging in
through SSL VPN, connecting over IPsec VPN from FortiClient, and even if certificates are involved. You can use
the following command to debug authentication:
diagnose debug application authd -1
diagnose debug enable
authd_http.c:1910 authd_http_connect: called
authd_http.c:3071 authd_http_change_state: called
change state to: 3
authd_http.c:1112 authd_http_read: called
authd_http.c:2383 authd_http_wait_req: called
authd_http.c:2443 authd_http_read_req: called
authd_http_common.c:276 authd_http_read_http_message: called
authd_http_common.c:229 authd_http_is_full_http_message: called
authd_http.c:4899 authd_http_on_method_get: called
authd_http.c:2098 authd_http_check_auth_action: called
authd_http.c:3071 authd_http_change_state: called
change state to: 2
The output shows the messages the authentication daemon is receiving and the resulting state changes. This
authentication session was between a FortiGate unit and FortiClient during an IPsec VPN session setup.
3/4
04/12/2014
http://docs-legacy.fortinet.com/cb/html/index.html#page/FOS_Cookbook/Install_advanced/cb_ts_debug.html
4/4