Skip to main content
BK201
Staff
Staff
Dec 11, 2025 2:46 PM UTC

Technical Tip: How to perform a packet capture in FortiPAM

  • Aug 28, 2026 5:58 AM UTC
  • 0 replies
  • 235 views
  • Translate All

Description

This article describes how to use the built-in packet capture feature in FortiPAM from the GUI and CLI interfaces.

Scope

FortiPAM.

Solution

The following is a step-by-step guide to capturing packets from the GUI:

Go to Network -> Packet Capture and Create New packet capture, then select the correct interface and any filters required.

 

Screenshot 2025-12-11 132441.png

 

By 'right-clicking' the newly created record, it is possible to start the packet capture:

 

Screenshot 2025-12-11 132556.png

 

After capturing the selected traffic, it is possible to stop the capture and download the .pcap file:

 

Screenshot 2025-12-11 132810.png

 

Note: If the capture configuration is edited, it is important to use the Restart option. If Start is used, the capture will not be modified, and the old configuration will be used.

It is not possible to restart a running capture, so it is required to stop the process before performing a restart.

Step-by-step guide to capturing packets from CLI:

Open the CLI console on FortiPAM.

90575093.png


Run these commands: 

diagnose sniffer packet <Interface> <Port number>
diagnose sniffer packet  <Interface> 'host x.x.x.x'


Example:

diagnose sniffer packet any 'host 10.10.20.9'
diagnose sniffer packet port1 tcp 1812


On FortiPAM, the verbose level of the packet can be set to either of them. Verbose has 1 to 6 levels and, by default, it is always set to 1.

  • Level 1: Prints only the packet header (source/destination IP, ports, protocol, flags, sequence numbers).

  • Level 2: Prints the packet header and the data from the IP layer (includes IP payload).

  • Level 3: Prints the packet header and the data from the Ethernet layer (includes Ethernet payload).

  • Level 4: Same as level 1, plus the interface name where the packet was captured.

  • Level 5: Same as level 2, plus the interface name.

  • Level 6: Same as level 3, plus the interface name.

Parameter description values:

<interface> Interface to capture on any, port1, port2, etc.

<filter> BPF (Berkeley Packet Filter) expression 'host x.x.x.x', 'port 1812', 'tcp and port 22', none.

<verbose> Level of detail 1–6 (see verbose levels table).

<count> Number of packets to capture 0 = indefinite, N = stop after N packets.

<tsformat> Timestamp format a = absolute UTC, l = local time, omitted = relative.

<frame size> Maximum frame size printed before truncation. Default = interface MTU. E.g., 68 for headers only.


4b6749a1.png


37d206e4.png


1a0eda17.png


In addition to 'verbose level', it is also possible to add 'Count parameter' and 'Timestamp parameter'.

Count parameter:

  • 0 = Capture indefinitely until interrupted.

  • 10 = Capture the first 10 matching packets.

  • 100 = Capture the first 100 matching packets.


Timestamp parameter (Common options include):

  • a – Absolute timestamp.

  • l – Long timestamp (human-readable date and time).

  • n – No timestamp.


For example:

diagnose sniffer packet any 'host 10.10.20.9 and port 8000' 4 10 l


Here, verbose level=4, count=10, and timestamp=long-timestamp.

A guide to importing 'sniffer packet' to Wireshark is available in Technical Tip: How to import 'diagnose sniffer packet' data to WireShark.

    Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024