nerdexam
Fortinet

NSE4_FGT-7.0 · Question #88

Which CLI command will display sessions both from client to the proxy and from the proxy to the servers?

The correct answer is D. diagnose wad session list | grep "hook=pre"&"hook=out". To view both client-to-proxy and proxy-to-server sessions, a FortiGate CLI command is needed to list WAD sessions and filter for both pre-proxy and outgoing hooks.

Troubleshooting and Monitoring

Question

Which CLI command will display sessions both from client to the proxy and from the proxy to the servers?

Options

  • Adiagnose wad session list
  • Bdiagnose wad session list | grep hook-pre&&hook-out
  • Cdiagnose wad session list | grep hook=pre&&hook=out
  • Ddiagnose wad session list | grep "hook=pre"&"hook=out"

How the community answered

(31 responses)
  • A
    3% (1)
  • B
    3% (1)
  • D
    94% (29)

Why each option

To view both client-to-proxy and proxy-to-server sessions, a FortiGate CLI command is needed to list WAD sessions and filter for both pre-proxy and outgoing hooks.

Adiagnose wad session list

The `diagnose wad session list` command alone lists all WAD sessions but does not specifically filter for the distinct client-to-proxy and proxy-to-server legs.

Bdiagnose wad session list | grep hook-pre&&hook-out

The syntax `hook-pre&&hook-out` is incorrect for specifying the field and for using a logical AND operation within the `grep` command.

Cdiagnose wad session list | grep hook=pre&&hook=out

While `hook=` is correct, using `&&` within `grep` patterns does not function as a logical AND for filtering content and will not correctly identify lines containing both desired patterns.

Ddiagnose wad session list | grep "hook=pre"&"hook=out"Correct

The `diagnose wad session list` command displays sessions handled by the web application firewall (WAD); piping this output to `grep "hook=pre"&"hook=out"` allows filtering for lines that contain both 'hook=pre' (client-to-proxy) and 'hook=out' (proxy-to-server) indicators, effectively showing both legs of the proxy session.

Concept tested: FortiGate WAD proxy session diagnostics

Source: https://docs.fortinet.com/document/fortigate/7.4.0/cli-reference/188580/diagnose-wad-session-list

Topics

#CLI commands#session debugging#proxy sessions

Community Discussion

No community discussion yet for this question.

Full NSE4_FGT-7.0 Practice