FortiGate Session limit Configuration

Hello everyone in this video i will configure traffic shaping and session limit for my test web server , By enforcing session limits, you can prevent a single client or a group of clients from establishing an excessive number of connections, thus reducing the impact of DDoS attacks, also Web servers have finite resources, including CPU, memory, and network bandwidth.

Allowing too many concurrent sessions can lead to resource exhaustion, resulting in degraded performance or even server crashes. The FortiGate Traffic Shaper is a feature within the Fortinet FortiGate firewall platform that allows you to control and manage network traffic by applying quality of service (QoS) policies. The Traffic Shaper provides a set of tools to shape, control, and monitor network traffic based on predefined policies and rules.

1. Log into the FortiGate Web Interface:

  • Open a web browser and enter the IP address of your FortiGate device.
  • Log in with administrator credentials.

2. Navigate to Security Policies:

  • In the FortiGate web interface, go to “Policy & Objects” or a similar section, depending on your FortiGate’s firmware version.

3. Create or Edit a Security Policy:

  • You can either create a new security policy or edit an existing one. A security policy defines the rules for traffic passing through the firewall.

4. Configure the Session Limits:

a. General Settings: – In the security policy configuration, you’ll find an option to set session limits. Look for a section labeled “Session Options” or similar.

b. Select Session Limit Type: – Choose the appropriate session limit type based on your requirements: – Limit: Sets a maximum limit on the total number of concurrent sessions allowed for this policy. – Per-User Limit: Sets a session limit per user, which is useful in user-based authentication scenarios. – Per-IP Limit: Sets a session limit per source IP address.

c. Configure Limit Value: – Specify the numeric value for the session limit. For example, if you chose “Limit” and set the value to 100, this policy would allow a maximum of 100 concurrent sessions.

d. Define Action on Limit: – Choose what should happen when the session limit is reached. Common actions include: – Accept: Continue accepting new sessions, ignoring the limit. – Drop: Reject new sessions once the limit is reached. – Log: Log information about sessions that exceed the limit. – Rate Limit: Throttle the rate of new sessions when the limit is reached.

e. Idle Timeout and Session Timeout: – These settings help manage session duration: – Idle Timeout: Set the maximum time a session can remain idle (no traffic) before it’s terminated. This prevents stale connections from consuming resources. – Session Timeout: Define the maximum duration a session can last before being terminated, regardless of activity.

f. Advanced Session Options (Optional): – Depending on your FortiGate firmware version and specific requirements, you may have additional session-related options to configure. These could include session helpers for specific protocols or advanced settings for more granular control over session behavior.

5. Save and Apply the Configuration:

  • Once you’ve configured the session limits according to your requirements, save the changes and apply the updated security policy.

6. Testing and Monitoring:

  • Thoroughly test your firewall rules and session limits to ensure they align with your network’s security and performance needs.
  • Monitor firewall logs and session statistics to track how the session limits are being enforced and whether any adjustments are needed.

Please note that the exact steps and terminology may vary depending on your FortiGate firmware version. Consult the official Fortinet documentation or seek assistance from Fortinet support for version-specific details or advanced configurations. Additionally, it’s important to regularly review and update your security policies to adapt to changing network requirements and threats.