Chapter 11 IPsec VPN for FortiOS 5.0 : L2TP and IPsec (Microsoft VPN) : Troubleshooting : Using the FortiGate unit debug commands
  
Using the FortiGate unit debug commands
To view debug output for IKE and L2TP
1. Start an SSH or Telnet session to your FortiGate unit.
2. Enter the following CLI commands
diagnose debug application ike -1
diagnose debug application l2tp -1
diagnose debug enable
3. Attempt to use the VPN and note the debug output in the SSH or Telnet session.
4. Enter the following command to reset debug settings to default:
diagnose debug reset
To use the packet sniffer
1. Start an SSH or Telnet session to your FortiGate unit.
2. Enter the following CLI command
diagnose sniffer packet any icmp 4
3. Attempt to use the VPN and note the debug output.
4. Enter Ctrl-C to end sniffer operation.