In the realm of network security, FortiGate firewalls offer robust features to manage and control traffic flow. One such feature is the prefix list, a powerful tool for defining IP address ranges. Let's delve into the world of FortiGate prefix lists, exploring their creation, usage, and a practical example.

Prefix lists are crucial for defining IP address ranges, enabling you to create access control lists (ACLs) and other policies more efficiently. They help streamline network management by allowing you to group related IP addresses under a single object.

Understanding FortiGate Prefix Lists
Before we dive into an example, let's understand the basics of FortiGate prefix lists. A prefix list consists of a sequence of IP address prefixes, each with an associated action. These actions determine how the firewall should handle traffic matching the specified prefix.

Prefix lists are typically used in conjunction with other firewall features, such as ACLs, traffic filtering, and quality of service (QoS) policies. They provide a flexible and efficient way to manage IP address ranges, making your firewall configuration more organized and easier to maintain.
Creating a Prefix List

To create a prefix list, navigate to the "Policy & Objects" > "IPv4/Prefix List" menu in your FortiGate GUI. Click on "Create New" to open the configuration page. Here, you can define the prefix list name, description, and the IP address prefixes with their corresponding actions.
For instance, you might create a prefix list named "MyCompanySubnets" with the following entries:
- 192.168.1.0/24 (Permit)
- 10.0.0.0/8 (Deny)
- 172.16.0.0/16 (Permit)

In this example, the firewall will permit traffic from the 192.168.1.0/24 and 172.16.0.0/16 networks, while denying traffic from the 10.0.0.0/8 network.
Using Prefix Lists in ACLs
Prefix lists shine when used in access control lists (ACLs). Instead of defining each IP address or range individually, you can reference a prefix list in your ACL configuration. This approach simplifies firewall management and makes your configuration more readable.

To use a prefix list in an ACL, navigate to the "Policy & Objects" > "IPv4/Access List" menu and create a new ACL. In the "Source" or "Destination" field, select "Prefix List" and choose the prefix list you created earlier. This allows you to apply the same IP address range definitions across multiple ACLs, ensuring consistency in your firewall configuration.
FortiGate Prefix List Example




















Let's consider a real-world example to illustrate the power of FortiGate prefix lists. Suppose your organization has multiple offices, each with its own IP address range. You want to create a firewall policy that permits traffic between these offices while denying traffic from the internet.
First, create a prefix list named "OfficeSubnets" with the following entries:
| Office | IP Address Range | Action |
|---|---|---|
| Headquarters | 192.168.1.0/24 | Permit |
| Branch1 | 172.16.1.0/24 | Permit |
| Branch2 | 10.0.1.0/24 | Permit |
| All Other Traffic | any | Deny |
Next, create an IPv4 policy with the following settings:
- Source: Prefix List (OfficeSubnets)
- Destination: Prefix List (OfficeSubnets)
- Action: Permit
- Schedule: Always
Finally, create another IPv4 policy with the following settings to deny all other traffic:
- Source: any
- Destination: any
- Action: Deny
- Schedule: Always
With this configuration, your FortiGate firewall will permit traffic between your organization's offices while denying all other traffic, ensuring a secure and controlled network environment.
In the dynamic world of network security, prefix lists offer a powerful tool for managing IP address ranges efficiently. By understanding and leveraging FortiGate prefix lists, you can streamline your firewall configuration, improve security, and simplify network management. Stay proactive, and keep your network secure with FortiGate!