Using DTLS to improve SSL VPN performance
Description
Â
How to use DTLS to improve SSL VPN performance.
Occasionally, SSL VPN performance can be slower than expected. Because the SSL VPN encapsulates a TCP connection within another TCP connection, this can cause timeout conflicts and other issues.
TCP traffic carried inside a TCP VPN tunnel can suffer substantial performance degradation when packets are lost. Testing DTLS, which carries VPN traffic over UDP, is recommended.
Since 5.4, it is possible to use DTLS to address this problem. DTLS has the same security as SSL, but uses UDP instead of TCP. This can improve performance drastically.
Scope
Â
FortiGate.
Solution
Â
To enable DTLS on SSL VPN, run the following commands:
Â
config vpn ssl settings
   set dtls-tunnel enable
endÂ
This has been enabled by default since 5.4.
If the user(s) are still using TCP, check FortiClient settings to ensure that the option 'Preferred DTLS Tunnel' is checked in the settings. If the option is greyed out, select the padlock in the top right to unlock it (Screenshot below). See the following FortiClient article for more information: VPN options | FortiClient Administration Guide
                       Â

Â
When FortiClient is managed by EMS, the DTLS option cannot be enabled directly on the FortiClient console. Changes need to be pushed by the administrator from EMS.
Â
Verification steps to see if FortiClient is using DTLS:
Â
Check the Public IP of the PC connected with FortiClient and the SSL VPN Port.
Â
get vpn ssl monitor
show full vpn ssl settings | grep "port "Â
Example:
Â

Â
Perform a packet capture with the Public IP and SSL VPN Port. UDP packets should be seen:
Â
diagnose sniffer packet any 'host <PC Public IP> and port <SSLVPN Port>' 4 10 lÂ
Example: 

 
Note:
The DTLS option for all macOSÂ on the FortiClient is supported starting 7.2.2.:Â
SSL VPN DTLS support for FortiClient (macOS) and (Linux) 7.2.2 | FortiClient 7.2.0 New Features
Â
Related articles:
Technical Tip: How to enable DTLS option from EMS
Troubleshooting Tip: DTLS connection is not negotiated when connecting to FortiSASE with Windows PCÂ
