FortiGate – session clearing via CLI

glitchlist Uncategorized Leave a Comment

Quick Tip:

to reset a specific session we can use the diag sys session clear command:

  1. type diagnose sys session filter clear for clearing all previously filters.

2. choose between all these options:

diagnose sys session filter ?
vd Index of virtual domain. -1 matches all.
sintf Source interface.
dintf Destination interface.
src Source IP address.
nsrc NAT’d source ip address
dst Destination IP address.
proto Protocol number.
sport Source port.
nport NAT’d source port
dport Destination port.
policy Policy ID.
expire expire
duration duration
proto-state Protocol state.
session-state1 Session state1.
session-state2 Session state2.
clear Clear session filter.
negate Inverse filter.

3. set a filter with diagnose sys session filter dst 1.1.1.1 (for example)

4. execute diagnose sys session clear that clear the sessions defined by the filter.

bye

.glitchlist crew

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.