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.
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)- A3% (1)
- B3% (1)
- D94% (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.
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.
The syntax `hook-pre&&hook-out` is incorrect for specifying the field and for using a logical AND operation within the `grep` command.
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.
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
Community Discussion
No community discussion yet for this question.