Created on 12-13-2020 11:29 PM Edited on 12-13-2024 12:24 AM By Jean-Philippe_P
This article describes the reasoning and process for configuring an IP address for an IPsec tunnel interface.
FortiGate, IPsec.
As a primer, traffic self-originated by the FortiGate (such as ICMP pings, SNMP traps, logs sent to syslog/FortiAnalyzer, etc.) will generally use the IP address of the outgoing interface used to reach the remote destination. It is possible to override this behavior and specify a particular Source IP for certain services on the FortiGate (see also: Technical Tip: How to control/change the FortiGate source IP for self-generated traffic).
Notably, IPsec tunnel interfaces are one of the few interface types that can be configured without needing an IP address to be applied. If the FortiGate needs to self-originate traffic using an IPsec tunnel that lacks an IP address, then it will fall back to using the first available address from the interface list (i.e. the lowest indexed interface shown in diagnose ip address list). Refer to the following KB article for more information on the subject: Technical Tip: Self-originating traffic over IPSec VPN (For example ping).
If it is not possible to set a specific Source-IP for the self-originated traffic then it is likely that the traffic will fail to reach its intended destination due to routing issues. For example, CLI backups using SFTP will fail if the outgoing interface is an IPsec tunnel interface lacking an address (see also: Technical Tip: How to take backup from CLI using secure FTP (SFTP) protocol).
With that in mind, the general recommendation is to set IP addresses on IPsec Tunnel interfaces to ensure that self-originated traffic uses a source address that can be routed through the network successfully. Here are some additional suggestions to consider when setting the address:
In the following example, the IPsec tunnel interface has a local IP address of 172.16.1.101 and a Remote IP/Netmask of 172.16.1.1/24 (255.255.255.0). To set the interface address, go to Network -> Interfaces and edit the IPsec tunnel interface:
The equivalent CLI configuration would be as follows:
config system interface
edit "advpn1"
set vdom "root"
set ip 172.16.1.101 255.255.255.255
set allowaccess ping
set type tunnel
set remote-ip 172.16.1.1 255.255.255.0
set snmp-index 9
set interface "VLAN201"
end
Related article:
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.