Created on
08-13-2024
12:18 PM
Edited on
02-04-2025
11:10 PM
By
Anthony_E
Description | This article describes how to use a prefix list to filter out public IP addresses learned by OSPF to prevent them from being added to the routing table. |
Scope | FortiGate configured with OSPF. |
Solution |
A prefix list matching the private IP ranges of RFC1918 can be used in 'distribute-list-in' under 'config router ospf'.
Prefix list configuration:
config router prefix-list edit "RFC_1918" config rule edit 1 set prefix 10.0.0.0 255.0.0.0 set le 32 next edit 2 set prefix 172.16.0.0 255.240.0.0 set le 32 next edit 3 set prefix 192.168.0.0 255.255.0.0 set le 32 next end next end
Before applying the prefix list, the public IP 4.4.2.2 is received and added to the routing table:
get router info ospf route
Applying the prefix list:
config router ospf set distribute-list-in "RFC_1918" end
The following is the routing table after applying the prefix list. The public IP 4.4.2.2 is received but not added to the routing table:
get router info ospf route |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.