Skip to main content
ryanswj
New Member
March 21, 2025
Question

FortiClient Remote Access IPsec-over-TCP not working

  • March 21, 2025
  • 61 replies
  • 43768 views

Hi, I am running FortiOS 7.4.7 on a FortiGate-60F and am trying to migrate from SSLVPN to IPsec VPN.

 

I've managed to configure IPsec (IKEv2) dial-up to work fine, but I notice that when I set the mode to IPSec over TCP, FortiClient (v7.4.3) does not connect and times out. UDP mode works perfectly fine.

 

I also notice that TCP 4500 is not one of the local-in policies on the firewall.

 

Does a local-in policy need to be configured for this to work? Has anyone had any experience with this?

 

Thank you!

 

61 replies

nikriaz
Explorer
June 12, 2025

Nope. 80F 7.6.3 and free FortiClient 7.4.3.1790. Custom port 444.
In a sniffer I only see syn and ack. In IKE debug I only see there 3 lines.
Notice a timeout occurs in 18 seconds. 
Pretty hopeless.

2025-06-12 16_05_24-_new 5 - Notepad++.png
 
nikriaz
Explorer
June 15, 2025

I found on German reddit that people discovered that if on 7.6.x change standard port 443 to something else and then revert back to 443 it starts to work!

Unfortunately I can't test it because I have productive SSL behind FGT so I cannot use or even try standard 443 and it seems like non-standard port just does not work. 

yderek
Staff
Staff
June 17, 2025

Hi, @ryanswj 
Try below setting 


config system settings
    set ike-tcp-port 443

end

After that 

diagnose vpn ike restart 

This will restart current VPN instance, try move this activity after hours

And change the TCP port on FortiClient accordingly 

nikriaz
Explorer
June 18, 2025

It does not help. Furthermore diagnose vpn ike restart nukes existed and working (non-TCP) connections by replacing polices by default ones even though it is not reflected in GUI, so experiment with caution. 

kurtt
Visitor III
July 1, 2025

Make sure if you are using 443 for IPSEC over TCP that you are also not using 443 for other daemons like proxy or admin interface. Does not matter what interface its bound to. Also if testing from a windows machine, make sure you have the latest visual C++ runtime installed or ipsec over TCP doesnt work. This seems dumb but this was our issue. I had tested from multiple windows machines and all had older versions of the runtime. It has to be the newest one available. You could confirm this by testing from a non windows machine. The behavior is as described, you get the ack reply and then nothing happens.

MZBZ
Staff
Staff
July 1, 2025

If you have issues with IPSec IKEv2 over TCP:

1. Make sure you are using FortiGate FortiOS 7.4.8+ or 7.6.3+

2. Test with TCP port other than 443 if you have issues with 443. Compare the result.

3. Wait for FortiClient 7.4.4/7.4.5

4. Contact Fortinet Technical Support with a valid FortiEMS license and ask for B6699 for tests and log collection.

Henry0
New Member
July 20, 2025

I managed to fixed the issue. Must select DH group 14 or above on FortiClient if you are using the dialup vpn template on FortiGate.

 

Running FortiOS 7.4.8 and FortiClient 7.4.3 work well with IKE TCP

nikriaz
Explorer
July 21, 2025

In Phase1 or PFS in Phase 2? Must be something else, I always use >DH14 and tried Phase 2 with and without PFS, it didn't help on 7.6.3

FortiDor
Explorer II
July 21, 2025

Hi,

 

On my side seems to work FortiClient IPSec over TCP (port tcp/443 & udp/500) only with a local user group(ldap broken I guess) with the 7.4.3 version + FGT 7.4.8

Right with only one DH 14 but with PFS

 

Need to uninstall the FCT if there was a previous upgrade and do a clean installation

And check network adapters from Fortinet in "Device-Manager". There were Fortinet Adapters with #2 or #3 at the end. Delete them, afterwars it started to work. 

mycoolusername
Visitor III
July 30, 2025

We are experiencing the same or a very similar issue. We are using udp-fallback-tcp because some of our users are in restrictive networks.
While UDP works without any problems, users who rely on TCP are encountering connection failures.

In the firewall's IKE debug log, we consistently see only the following three lines for TCP connections which fail:

ike V=root:accepts ike tcp-transport(vd=0, vrf=0, intf=0:45, <external-firewall-wan-ip>:443-><external-client-wan-ip>:49936 sock=43 refcnt=2 ph1=(nil)) (1). ike V=root:deletes tcp-transport(vd=0, vrf=0, intf=0:45, <external-firewall-wan-ip>:443-><external-client-wan-ip>:49936 sock=43 refcnt=2 ph1=(nil)) (1). ike V=root:destroys tcp-transport(vd=0, vrf=0, intf=0:45, <external-firewall-wan-ip>:443-><external-client-wan-ip>:49936 sock=43 refcnt=0 ph1=(nil)) (0).


On the client side, Wireshark shows that three packets are sent for a standard TCP 3-way handshake. After that, there is a pause of about 15–17 seconds, followed by a fourth packet with RST, ACK sent to the FortiGate.

Interestingly, TCP connections work fine on some other clients. I tried to reproduce the issue and was partially successful: a client forced to use TCP has a 50/50 chance of connecting. When clicking "Connect" in the client, it either connects successfully via TCP or fails with the same 3-way handshake and RST behavior, along with the same firewall log. Waiting a few seconds and trying again results in the same 50/50 chance behavior.
Some users, however, experience a permanent failure and are never able to connect via TCP.

Changing the default IKE TCP port to 4500 did not make any difference.

Has anyone found a workaround?

 

Configuration:
FortiOS v7.4.8
FortiClient VPN 7.4.3.1790

config vpn ipsec phase1-interface     edit "VPN_User"         set type dynamic         set interface "VLAN_2"         set ike-version 2         set local-gw <external-wan-ip>         set peertype any         set net-device enable         set mode-cfg enable         set proposal aes256-sha256 aes256gcm-prfsha256         set comments "VPN for employees (remote work)"         set dhgrp 14         set eap enable         set eap-identity send-request         set authusrgrp "LDAP_VPN_USER"         set transport udp-fallback-tcp         set fallback-tcp-threshold 10         set ipv4-start-ip 10.10.10.10         set ipv4-end-ip 10.10.10.240         set dns-mode auto         set ipv4-split-include "VPN_User_Allowed_NW_1"         set save-password enable         set psksecret ENC <key>     next

 


In the working case, the client proceeds with many additional events after HandleTunnelConnectRequest, such as Preflight_*, StartConnection, TunnelConnecting, etc.
In the error case, the client remains stuck in the Wait state after HandleTunnelConnectRequest, and no further events are triggered.

Client Log – Error Case:

[2025-07-29 19:00:29.8992854] [FortiVPN 161 debug] In state: TunnelConnectRequest [2025-07-29 19:00:29.8992862] [FortiVPN 1107 debug] => fortivpn::StateMachine::HandleTunnelConnectRequest(Mobile Arbeit) ... [2025-07-29 19:00:29.9027386] [FortiVPN 161 debug] In state: Wait

 

Client Log – Working Case:

[2025-07-29 19:31:41.8430029] [FortiVPN 161 debug] In state: TunnelConnectRequest [2025-07-29 19:31:41.8430041] [FortiVPN 1107 debug] => fortivpn::StateMachine::HandleTunnelConnectRequest(Mobile Arbeit) ... [2025-07-29 19:31:36.5124044] [FortiVPN 161 debug] In state: Wait [2025-07-29 19:31:36.5767789] [FortiVPN 322 debug] fortivpn::IDataManager::ValidateSessionVPNs [2025-07-29 19:31:36.5768208] [FortiVPN 101 debug] fortivpn::StateMachine::AddEvent type=15 (GlobalVPNEnvironmentChanged) ... [2025-07-29 19:31:41.8429960] [FortiVPN 385 debug] Got event: 17 "TunnelConnectRequest" [2025-07-29 19:31:41.8548741] [FortiVPN 385 debug] Got event: 18 "Preflight_EnvironmentCompliance" ... [2025-07-29 19:31:42.0790388] [FortiVPN 385 debug] Got event: 28 "StartConnection"


 

nikriaz
Explorer
September 2, 2025

Thank you for detailed investigation. I just want to say that is simply unbelievable that Forti dropped VPN over SSL, released IKE over TCP into production instead, it is simply does not work, potentially hurting millions of users, and they just keep silence with zero comments. The quintessence of irresponsibility.

riccardo_roveri_labs
Visitor III
August 7, 2025

I am facing the exact same issue, did you manage to solve it? 

KyuBi
New Member
August 26, 2025

I am facing the exact same issue, did you manage to solve it? 

 

VinayHM
Staff
August 7, 2025

Instead of auto, use tcp.

riccardo_roveri_labs
Visitor III
August 7, 2025

I am using only tcp transport and i set it explicitly using

set transport tcp

 

I am trying with a w11 vm to replicate my user issues and it seems that the first connection is successfull but the other ones fail with the same ike message of @mycoolusername 

mycoolusername
Visitor III
August 8, 2025

For us, simply setting "tcp" instead of "udp-fallback-tcp" didn’t work either. It turns out that most of the clients experiencing this issue were still running very old Windows builds, like 1809 or newer, but still outdated.

We reinstalled those machines with more recent Windows versions, and the problems were almost entirely resolved. So, it’s unclear whether the Windows reinstall itself helped or if the outdated Windows versions were the root cause.

That said, we’re still seeing this issue occasionally on some newer clients, but far less frequently than before.

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!