In the realm of network security, FortiGate firewalls offer robust features to manage and control network traffic. One such feature is the prefix list, which is a powerful tool for defining IP address ranges. Let's delve into an example of a FortiGate prefix list with a focus on the 'ge' (greater than or equal to) operator.

Prefix lists are crucial for defining access policies, quality of service (QoS) rules, and traffic filtering. They allow you to specify IP address ranges using CIDR notation, making it easier to manage complex IP schemes.

Understanding FortiGate Prefix Lists
Before diving into the 'ge' operator, let's understand the basic syntax of a FortiGate prefix list. The general format is as follows:

config system prefix-list
edit <prefix-list-name>

set prefix <ip-address/cidr>
set action <accept|deny>
Defining IP Address Ranges

The 'prefix' command is used to define the IP address range using CIDR notation. For instance, '192.168.1.0/24' represents all IP addresses from 192.168.1.0 to 192.168.1.255.
The 'action' command determines whether to accept or deny traffic matching the defined IP range.
The 'ge' Operator

The 'ge' operator is used to match IP addresses that are greater than or equal to the specified value. This operator is particularly useful when you want to match a range of IP addresses that start from a specific point but are not defined by a fixed CIDR block.
Here's an example of using the 'ge' operator in a FortiGate prefix list:




















config system prefix-list
edit my-prefix-list
set prefix 192.168.1.100 ge
set action accept
In this example, the prefix list 'my-prefix-list' will accept any IP address greater than or equal to 192.168.1.100.
Using Prefix Lists in FortiGate Policies
Prefix lists can be used in FortiGate policies to control traffic based on the defined IP address ranges. Here's how you can apply the 'my-prefix-list' created earlier in a policy:
config firewall policy
edit <policy-name>
set srcaddr prefix my-prefix-list
set dstaddr any
set action accept
In this policy, any traffic originating from IP addresses greater than or equal to 192.168.1.100 will be accepted, regardless of the destination address.
Combining Prefix Lists and Ranges
You can also combine prefix lists with explicit IP address ranges to create more complex traffic control rules. For instance, you can create a prefix list to match IP addresses greater than or equal to 192.168.1.100 and use it alongside an explicit range for 192.168.1.0/24:
config firewall policy
edit <policy-name>
set srcaddr prefix my-prefix-list, 192.168.1.0/24
set dstaddr any
set action accept
In this case, the policy will accept traffic from both the range 192.168.1.0/24 and any IP address greater than or equal to 192.168.1.100.
Mastering FortiGate prefix lists and operators like 'ge' empowers you to create sophisticated traffic control rules, enhancing your network's security and efficiency. Regularly reviewing and updating your prefix lists ensures that your firewall policies remain effective and relevant in an ever-changing network landscape.