Information Technology Grimoire

Version .0.0.1

IT Notes from various projects because I forget, and hopefully they help you too.

Fortinet VPN Troubleshooting

CommandDescriptionDangerous
diag vpn tunnel listLists all VPN tunnels and their statuses.Safe
diag vpn ike gateway listShows IKE gateways for troubleshooting phase1 negotiations.Safe
diag vpn ike log-filter <criteria>Sets filter criteria for viewing IKE logs. Useful for narrowing down log output for specific tunnels or endpoints.Safe
diag debug app ike -1Enables detailed IKE debug logs.Safe
diag debug enableTurns on debug messages. Use after specifying what debug messages to enable.Safe
diag debug disableTurns off all debug messages.Safe
get vpn ipsec phase1Displays phase1 configurations and statuses.Safe
get vpn ipsec phase2Shows phase2 configurations and statuses.Safe
diag vpn ipsec statusProvides a summary of the IPsec status, including active tunnels.Safe
diag debug resetResets debug settings to default.Safe
diag debug flow trace start 100Starts packet flow tracing for 100 packets. Adjust the number based on your needs.Safe
diag debug flow filter addr <IP address>Sets a filter to trace the flow for a specific IP address.Safe
diag debug flow show console enableEnsures debug flow output is shown in the console.Safe
diag debug flow show function-name enableShows function names in flow debug output for deeper analysis.Safe
diag debug console timestamp enableAdds timestamps to debug output, useful for time-based troubleshooting.Safe
exec ping <destination>Pings a destination from the FortiGate to test reachability. Useful in VPN troubleshooting to check if tunnel endpoints are reachable.Safe
exec traceroute <destination>Traces the route to a destination. Helps in identifying where packet drops are happening in the path.Safe
get vpn ssl statsDisplays statistics for SSL VPN, including active sessions.Safe
diag vpn ssl listLists SSL VPN sessions with detailed information.Safe
diag debug application sslvpn -1Enables detailed debug for SSL VPN.Safe
diag debug application ike -1Enables detailed IKE debug logs. Use cautiously as it generates a lot of logs.Safe
Last updated on 9 Feb 2024
Published on 9 Feb 2024