Skip to main content
Markus_M
Staff & Editor
Staff & Editor
February 23, 2010

Technical Tip: Customizing Session TTL in FortiOS

  • February 23, 2010
  • 0 replies
  • 20615 views

Description
Customizing Session TTL on the FortiGate.

 


Scope

 


Solution
Customize the session timeout for a particular port on the FortiGate unit with the following CLI commands:

 # config system session-ttl
 # config port

     edit <port_range_index>
         set end-port <port_number_int>
         set protocol <protocol_int>
         set start-port <port_number_int>
         set timeout {<timeout_int> | never}
      end
end

It is necessary to configure both the start-port and end-port. To specify a range, the start-port value must be lower than the end-port value. To specify a single port, the start-port value must be identical to the end-port value. The range is 0 to 65535.

To enter a port number range you must set protocol to 6 for TCP sessions or to 17 for UDP sessions.

This can be used if stale TCP sessions need to be timed out faster, or should stay alive longer as certain software might need a longer session-ttl to keep functioning.
Note: Changing this without being aware of the consequences might though have negative impact.

For the port numbers:
https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml

 

Related Articles

Technical Tip: Change session ttl on firewall policy

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.