IT Toolbox

Capture packets with the FortiGate sniffer

View my favorites
FortiGate Moderate risk

Capture packets with the FortiGate sniffer

Observes a precise traffic through the firewall from a host and port filter.

Command / script
diagnose sniffer packet any 'host 192.168.1.10 and port 443' 4 100 l

When should you use it?

Use this to confirm whether a packet reaches the FortiGate, leaves it, or receives a reply.

What the script does

  • any listens on all interfaces.
  • The filter limits the capture to the specified host and port.
  • Verbosity level 4 shows interfaces and headers; 100 limits the packet count.

Precautions

  • Always use a precise filter to avoid excessive output.
  • A packet capture can expose sensitive network metadata.
  • Stop the capture with Ctrl+C when necessary.

Rollback

The capture stops automatically after 100 packets or when you press Ctrl+C.

♡ 0