Description
This article describes how to configure a static route with address objects or address groups.
Scope
FortiGate.
Solution
Configure a standard address through the GUI under Policy & Objects, specifying the name, type, and subnet:
GUI view:
From FortiOS v7.4.0, it is possible to define a preferred source IP for static routes to control the source IP used for local-out traffic. This setting allows better control over the source IP on egress interfaces, making it feasible to use a specified IP instead of the default interface IP.
config router static
edit <id>
set preferred-source <ip_address>
next
end
This configuration allows local-out traffic using the static route to use the preferred source IP instead of the IP associated with the egress interface.
Verification:
get router info routing-table details 10.0.0.0
Routing table for VRF=0
Routing entry for 10.0.0.0/24
Known via "static", distance 10, metric 0, best
* vrf 0 192.168.1.1, via port1
Note: To add the address objects in a group, either disable or enable static route configuration for all of the address objects in the same group. The parameter static route configuration must be disabled or enabled in the same way.
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 2024 Fortinet, Inc. All Rights Reserved.