How To Configure IPS On Fortigate Firewall
How To Configure IPS On Fortigate Firewall
Introduction
Intrusion Prevention Systems (IPS) play a critical role in network security by identifying and
blocking threats before they can cause harm. FortiGate's IPS uses both anomaly-based and
signature-based techniques to protect networks from a variety of attacks. This guide provides a
detailed overview of IPS concepts, configuration steps, and best practices.
Key Concepts
• Exploit: A program or piece of code designed to find and take advantage of a security
flaw or vulnerability in an application or system, typically for malicious purposes such as
installing malware. An exploit is not malware itself but rather a method used by
cybercriminals to deliver malware.
• Vulnerabilities: Known attacks with identifiable patterns that can be matched by IPS,
WAF, or antivirus signatures.
IPS concepts
Purpose
IPS protects your network from external attacks using two main techniques:
IPS components
IPS Signatures
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 1 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/
• Protocol Decoders: These identify the protocols used in network traffic before checking
for attacks, allowing the IPS engine to efficiently scan only the relevant protocols.
IPS Engine
• Function: The IPS engine examines network traffic for attack signatures once the protocol
decoders have identified the protocols in use.
• Updates: The IPS engine and signatures are updated regularly to improve detection and
performance. FortiGuard provides frequent updates to ensure the IPS can detect new
vulnerabilities.
By default, each FortiGate firmware release includes an initial set of IPS signatures. Used
to upgrade the IPS signature database. In this way, the IPS is still effective for new
vulnerabilities.
• Protocol decoders are rarely updated unless the protocol specification or RFC changes
(which doesn't happen often).
• The IPS engine itself changes more frequently, but still infrequently.
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 2 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/
• The default automatic update schedule for FortiGuard packages has been updated.
Previously, the frequency was a recurring random interval within two hours.
Starting with FortiOS 7.0, the frequency is automatic and the update interval is calculated
based on the model and percentage of active subscriptions. The update interval is within
1 hour.
• The FortiGuard research team identifies and builds new signatures, just like antivirus
signatures. So, if your FortiGuard service contract expires, you can still use IPS.
However, just like anti-virus scanning, the efficiency of IPS scanning will increase with the
extension of signature time, and old signatures will not be able to defend against new
attacks.
contains signatures of some common attacks that cause few or no false positives. It is a
smaller database and its default action is to block detected attacks.
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 3 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/
The extended signature database:
• contains additional signatures for attacks that have a high-performance impact, or that
by their nature do not support blocking.
• In fact, due to its big size, the extended database is not suitable for FortiGate models with
smaller disks or memory. However, for high security networks, you may need to enable
the extended signature database.
• the extended database package may be disabled by default on some models, such as
desktop models.
You can only enable the extended IPS database by using the CLI.
ig ips global
• FortiGate models with the CP9 SPU receive the IPS full extended database, and the other
physical FortiGate models receive a slim version of the extended database.
The slim-extended DB is a smaller version of the full extended DB that contains top active
IPS signatures. It is designed for customers who prefer performance.
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 4 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/
Adding IPS Signatures and Filters
• By Signature:
Choose signatures individually. When a signature is selected in the list, that signature is
added to the sensor as a default action. You can then right click on the signature and
change the action.
Rate-based signatures
You can also add rate-based signatures to block specific traffic when it exceeds a
threshold for a configured period of time.
Rate-based signatures are a subset of the signatures that are found in the database that
are normally set to monitor.
This group of signatures is for vulnerabilities that are normally only considered a serious
threat when the targeted connections come in multiples, a little like DoS attacks.
This saves system resources and prevents repeated attacks. FortiGate does not track
statistics for this client, and it is temporarily blocked.
• By Filters:
Add signatures to sensors by using filters. FortiGate adds all signatures that match the
filter.
Rules are similar to firewall policy matches; the engine first evaluates the filters and
signatures at the top of the list and applies the first match. The engine skips subsequent
filters.
Avoid doing too many filters, as this increases computation and CPU usage.
Also, avoid making very large signature groups in each filter, which increases memory
usage.
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 5 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/
Exempt IPs
This feature is very useful during false positive virus outbreaks. You can temporarily bypass
affected endpoints until you investigate and correct the false positive issue.
IP exemptions can only be configured on a single signature. Each signature can have
multiple IP exemptions.
• Packet Logging: Save copies of packets that match the signature for analysis.
DDoS attack
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 6 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/
overwhelmed and unable to service genuine users. The attacker does not gain access to
the target system, but it is not accessible to anyone else.
Besides protecting against threats and exploitation of vulnerabilities, the IPS engine is also
responsible for mitigating DDoS attacks using anomaly-based defense,
Since the botnet database is part of the FortiGuard IPS contract, administrators can
enable scanning for botnet connections to maximize its internal security.
{A botnet refers to a group of computers which have been infected by malware and
have come under the control of a malicious actor. The term botnet is from the word’s
robot and network and each infected device is called a bot.}
Best Practices
✓ It is also important to consider the direction of traffic. There are many IPS signatures that
only apply to clients, and many signatures that only apply to servers.
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 7 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/
✓ Create IPS sensors specific to the resources you wish to protect. This ensures that FortiGate
does not scan insignificantly signed traffic.
✓ IPS is not a fixed implementation. You need to monitor the logs regularly to find unusual
traffic patterns and adjust the configuration of the IPS profile according to the actual
situation. You should also regularly audit your internal resources to determine if certain
vulnerabilities still apply to your organization.
✓ Certain vulnerabilities apply only to encrypted connections. In some of these cases,
FortiGate cannot reliably identify threats without being able to parse the payload. For this
reason, if you want to get the most out of your IPS and WAF capabilities, you must use SSL
inspection profiles.
✓ Usually, the traffic that needs to be inspected, such as anti-virus and IPS, is processed by
the CPU on the FortiGate. However, there are dedicated chips on certain FortiGate
models that offload these inspection tasks. This frees up CPU cycles to manage other
tasks, and also speeds up sessions that require security checks.
Troubleshooting
• If there are any indications that the IPS definitions haven't been updated, you
should investigate {Always make sure that FortiGate has proper DNS resolution for
update.fortiguard.net}.
✓ The high CPU usage of the IPS engine is abnormal and needs to be checked. You can
troubleshoot these issues by using CLI, {diagnose test application ipsmonitor} command
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 8 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/
• Option 2: completely disable the IPS engine
• Option 5: enables IPS bypass mode. In this mode, the IPS engine is still running, but
no traffic inspection is performed.
If CPU usage drops after this, it usually indicates that the traffic being inspected is
too high for that FortiGate model.
If CPU usage remains high after enabling IPS bypass mode, it usually indicates a
problem with the IPS engine and needs to be reported to Fortinet Support.
• Option 99: ensures that all IPS-related processes restart gracefully.
✓ When there is no enough memory in the IPS socket buffer to accommodate new
packets, IPS will enter fail open mode.
• If the fail-open setting is enabled, some new packets (depending on system load)
will pass through without being inspected.
• If this setting is disabled, new packets will be dropped.
Frequent IPS failures to open events usually indicate that the IPS cannot meet the
traffic requirements. So, try to recognize patterns {Has traffic increased recently?
Has throughput demand increased? Are fail-opens triggered at specific times of
the day?}.
___________________________________________________________________________
How to Configure IPS on FortiGate Firewall | By: Emad Hegazi
Page 9 of 9 #support_team247 #FortiGate | https://www.linkedin.com/in/emadhegazi/