FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
sprashant
Staff
Staff
Article Id 331260
Description This guide illustrates the common SSL VPN best practices that should be taken into consideration while configuring the SSL VPN on the FortiGate to further strengthen the security.
Scope FortiGate.
Solution

Note: 

  1. For models with 2GB or less RAM, SSL VPN web and tunnel mode are removed from the GUI and CLI in v7.6 and later, check: SSL VPN to dial-up VPN migration
  2. The SSL VPN feature will no longer be available starting from v7.6.3: SSL VPN tunnel mode no longer supported

 

Changing the default port:

By default, 443 is the port used for SSL VPN connections. It is recommended to change the port to something other than 443, 10443, or 8443.

 

These are the most common ports that are usually used.

 

1..PNG

 

From CLI:

 

config vpn ssl settings

set port 11243

end

 

Restrict Access:

 

Make sure to restrict access to only a certain number of hosts. This can be done in two ways:

  1. Making an address group of all the host's public IPs.
  2. Selecting a geography. For example, the US or Canada.

2.PNG

 

Users should either be authenticated by 2FA or authenticated elsewhere (LDAP, RADIUS, SAML).

 

The recommendation is to always have two-factor authentication enabled if the users are defined locally.

However, any form of MFA (if the users are getting authenticated elsewhere) should be in place, as it adds another layer of security.

There is also an option to configure PKI certificates as MFA. For more details, see this section of the administration guide.

 

Creating a local-in policy:

Often, failed attempts are made for the SSL VPN connection. To stop FortiGate from generating the logs and stop the traffic at the interface level, configuring a local-in policy is advised.

 

3..PNG

 

To create a local-in policy, see the administration guide

As of FortiOS v7.6 and above, the local-in policy can be created from the GUI as well. See Technical Tip: Creating a Local-In policy (IPv4 and IPv6) on GUI

 

If we are not able to restrict it via a geography block, a good option is to create a script based on SSL-login-fail attempts.

For more information, refer to this KB article: Technical Tip: How to permanently block SSL VPN failed logins using an Automation Stitch

 

Limit SSL VPN login attempts, set block duration, and set parallel login.

The default login-attempt-limit for SSL VPN is set at 2, and the block duration is 60 seconds.

 

Increase or decrease the parameters accordingly to avoid any brute force attack.

 

See Technical Tip: How to limit SSL VPN login attempts and block duration.

 

As a best practice, limit a user to one login only. Go to VPN -> SSL VPN -> Select a portal: 'Limit Users to One SSL-VPN Connection at a Time'.

 

4..PNG

 

In the CLI:

 

config vpn ssl web portal

edit "<Portal Name>"

set limit-user-logins enable

end

 

This will ensure that a user can just login once and, if the login attempt is made for the same user, the connected user will get disconnected.

 

Disabling web-mode and replacement message.

 

If web mode is not in use, it is always recommended to disable the web-mode under the portal that is defined for the user group:

 

4.5.PNG

 

5..PNG

 

Moreover, since the web mode is not in use, as a safety measure, remove the replacement message from under the SSL VPN Login Page.

 

6..PNG

 

For more details, see Technical Tip: How to prevent the SSL VPN web login portal from displaying when SSL VPN web mode is ... and Technical Tip: How to create a blank page for SSL VPN Portal with replacement messages


Use the Custom Web Portal as the default portal:
Use a custom web portal with tunnel mode and web mode disabled for the default portal.

NO_ACCESS.PNG


NO_ACCESS_2.PNG

config vpn ssl web portal

    edit "NO_ACCESS"

        set forticlient-download disable

    next

end

config vpn ssl settings

    set default-portal "NO_ACCESS"

end

Disabling weak ciphers and TLS protocols for SSL VPN:

FortiGate supports multiple SSL/TLS versions and cipher suites. It is recommended to use at least 1.2 or 1.3.

 

config vpn ssl settings

    set ssl-max-protocol-ver

tls1-0 TLS version 1.0.

tls1-1 TLS version 1.1.

tls1-2 TLS version 1.2.

tls1-3 TLS version 1.3.

 

7..PNG

 

Related articles:

FortiGate encryption algorithm cipher suites - FortiGate administration guide

Troubleshooting Tip: SSL VPN Troubleshooting

Technical Tip: SSL VPN with external DHCP Server

Technical Tip: How to increase the SSL-VPN tunnel mode bandwidth for small model (multi SSL-VPN clie...

Technical Tip: Reasons for the 'iprope_in_check() failed' error in SSL VPN

Troubleshooting Tip: Error 'SSL-VPN slow file transfer issue'

Troubleshooting Tip: Checking maximum number of SSL VPN users using ‘diagnose vpn ssl statistics’

Technical Tip: FortiGate IPSec VPN Resource List

Technical Tip: FortiGate Resource Lists