Technical Tip: ZTNA Agentless web portal with multi-factor authentication
| Description | This article describes how to configure a Zero Trust Network Access (ZTNA) agentless web portal with multi-factor authentication (MFA) and bookmarks for SSH and Web access. In this example, a FortiGate firewall is configured to authenticate users from the local user database using FortiToken as the MFA method. |
| Scope | FortiGate v7.6.1+. |
| Solution | This guide provides a step-by-step procedure to configure a ZTNA agentless web portal secured with FortiToken-based MFA using local user or remote LDAP authentication. The ZTNA agentless web portal enables users to securely access protected internal resources using only a standard web browser, without installing a ZTNA agent on the client device.
In this example, the remote ZTNA client successfully resolves the FQDN "ztna.fortilab.local" to the FortiGate IP address 10.5.147.78.
Step 1.a. (local authentication): Create a local user named 'localtoken', enable FortiToken as the second authentication factor, and add the user to a firewall user group named 'local-fgt-users'.
config user local
Step 1.b (remote LDAP authentication): Configure an LDAP server according to the environment. Ensure the service account has sufficient permissions to query user and group objects in the directory.
config user ldap edit "ldap-fortiad" set server "10.15.19.81" set cnid "samaccountname" set dn "dc=fortiad,dc=local" set type regular set username "FORTIAD\\ldap-fgt" set password <PASSWORD> set group-search-base "CN=Users,DC=fortiad,DC=local" next end
Note: This example uses LDAP over cleartext (TCP 389) for demonstration purposes. In production environments, it is strongly recommended to configure LDAPS (LDAP over SSL/TLS) to ensure encrypted communication between the FortiGate and the directory server: Technical Tip: Difference between LDAP vs LDAPS.
After configuration, verify LDAP connectivity and user authentication using the following diagnostic command:
diagnose test authserver ldap <LDAP-SERVER-NAME> <LDAP-USER> <LDAP-USER-PASSWORD>
Create a remote LDAP user 'ad-user1' and enable an available FortiToken as the second authentication factor.
config user local
Note: This example uses FortiToken Mobile. When the FortiGate administrator assigns a token for the first time (FortiToken Mobile), the user will receive an activation code via email (see the Token Activation).
Step 2: Create a local group that includes the previously created remote LDAP user 'ad-user1' or the FortiGate local user 'localtoken'.
config user group
config user group
Step 3: Create a VIP of type access-proxy to handle incoming ZTNA agentless web portal connections on TCP/2587.
config firewall vip
Step 4: Define a virtual host that represents the FQDN ('ztna.fortilab.local') used to access the ZTNA web portal.
config firewall access-proxy-virtual-host
Note: It is recommended to use a trusted certificate matching the FQDN 'ztna.fortilab.local' instead of the default 'Fortinet_Factory' certificate.
Step 5: An authentication scheme with the method 'form' is mandatory to support FortiToken MFA. The option "require-tfa" should also be enabled to include a token prompt in the firewall authentication login. Configure an authentication scheme and rule as in the example below:
config authentication scheme
config authentication rule
If LDAP authentication is selected as the method (as per Step 1.b.), configure the authentication rule to use the LDAP server as the user database:
config authentication scheme
Step 6: Configure the ZTNA web portal using the previously configured VIP, virtual host, and authentication rule. To trigger the authentication portal, ensure that the 'auth-portal' option is enabled.
config ztna web-portal
Step 7: Define the bookmarks for internal resources, such as WEB, SSH, or RDP:
config ztna web-portal-bookmark edit "ssh" set apptype ssh next end
Step 8: Configure a proxy policy to allow access to the ZTNA web portal:
config firewall proxy-policy
Testing and validation:
Notes: For 'apptype web' to work, define FQDN under 'config ztna web-portal-bookmark' configuration.
Configuration example:
config ztna web-portal-bookmark edit "bookmarks" set groups "local-fgt-users" config bookmarks edit "URL_HTTPS" set url "https://example.com" next end next end
Related documents: ZTNA agentless web-based application access Technical Tip: How to configure ZTNA Session Based Authentication with MFA token |



