Description |
This article describes that starting from v7.4.2, a proprietary solution to support the encapsulation of Encapsulating Security Payload (ESP) packets within Transmission Control Protocol (TCP) headers has been introduced.
It allows ESP packets to be assigned a port number, enabling them to traverse carrier networks where direct IPsec traffic is blocked or impeded by carrier-grade NAT. |
Scope | FortiGate v7.4.2 or above, IKEv2. |
Solution |
Assume the diagram below:
FortiGate-A:
FortiGate-B:
set transport tcp end
config vpn ipsec phase1-interface set fortinet-esp enable end
This would force the FortiGate to use TCP as the transport when sending/receiving the ESP packets for this tunnel.
Verification:
FortiGate-A # diagnose vpn ike gateway list vd: root/0 id/spi: 46 8dfbaaa88edc80a0/5f7b0e209692b481
Verification of the IKE listening port from tcpsock. diag sys tcpsock | grep ike
0.0.0.0:11443->0.0.0.0:0->state=listen err=983048 socktype=0 rma=0 wma=0 fma=0 tma=0 inode=2616799 process=4901/iked
0.0.0.0:4500->0.0.0.0:0->state=listen err=524293 socktype=0 rma=0 wma=0 fma=0 tma=0 inode=2616797 process=4901/iked
Note 1: This feature only works with IKE version 2, and it does not support ADVPN.
Note 2: For v7.6.1 and above, TCP port 443 is used by default to encapsulate ESP packets within TCP headers using its proprietary solution.
In production, changing the port to TCP 443 can cause interruption in IPSEC traffic and require 'diagnose vpn ike restart' to bring the tunnel back.
Starting in v7.6.3, if administrators assign port 443 for HTTPS administrative access on an interface that is also bound to an IPsec tunnel, FortiOS will display a warning indicating that HTTPS access on that port will no longer be available. This is because port 443 is also used for IKE over TCP, and in such cases, IKE takes precedence over HTTPS, resulting in the loss of GUI access on that interface.
For more information, see GUI warnings for IKE-TCP port conflicts 7.6.3 - FortiGate 7.6.0 new features |
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.