Description | This article describes how to configure certificates in FortiGate to avoid certificate warnings using a captive portal in the firewall policy. |
Scope | FortiGate v6.0, v6.2 and earlier. |
Solution |
When the authentication LDAP is enabled into Firewall Policy, the FortiGate will trigger the Captive Portal authentication to user in order to get their user/passwords and validate it against the LDAP server.
By default, FortiGate will use port 1000 to authenticate HTTP and 1003 to HTTPS traffic.
config system global set auth-http-port 1000
When FortiGate received traffic of unauthenticated user IP, the FortiGate proxied the connection and sent an HTTP redirect to user's browser, in order to connect to FortiGate's internal IP to port 1000/1003 to authenticate.
For example, the unit debian-fortinet (192.168.81.101) does not belong to AD domain, but using LDAP authentication the device will authenticate against the LDAP server.
When the user in debian-fortinet browses to a site with HTTPS (i.e https://www.google.com), the browser will show the following error, since the FortiGate will intercept the connection and use the Fortinet_CA_SSL certificate to sign the certificate on the fly to Google, so the browser will identify it as invalid since is not a public CA.
The FortiGate needs to intercept the HTTPS connections and impersonate the end site because needs to inject the http messages to redirect the connection to https://fortigate_ip:1003 to authenticate the user.
To avoid certificate warning in the browser during the captive portal authentication it is possible to apply the following procedure:
>nslookup captiveportal.markoz.local Name: captiveportal.markoz.local
Note. If the wildcard certificate was issued by a Public CA this step can be skipped. However, the issuer of that wildcard certificate [sometimes intermediate certificate] should be added as 'Remote CA' in the FortiGate if not already there. To check for existing Root CA certificates, follow: Technical Tip: How to View the Default Trusted CA Certificates on FortiGate and to verify the certificate chain, follow: Technical Tip: How to avoid certificate error message by chaining Root CA and Intermediate CA certif...
config firewall auth-portal
config user setting
Optionally in the auth-ca-cert it is possible to use the default CAPrivate Fortinet_CA_SSL.
The Fortinet_CA_SSL is the certificate used on the deep-inspection profile of SSL/SSH Inspection since all browsers in the LAN must have installed it to avoid warning certificates during regular browsing when deep-inspection has been enabled on firewall policies.
The next time a user tries to browse to an HTTPS site, the FortiGate will intercept the connection and will redirect to https://captiveportal.markoz.local:1003 to authenticate the user without a certificate warning.
Related articles: |
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.