Technical Tip: Preventing certificate warnings using captive portal
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 in the Firewall Policy, the FortiGate will trigger the Captive Portal authentication for users to get their user/passwords and validate them against the LDAP server.  By default, FortiGate will use port 1000 to authenticate HTTP and 1003 to HTTPS traffic.  When FortiGate received traffic from an unauthenticated user IP, the FortiGate proxied the connection and sent an HTTP redirect to the 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 the 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 it is not a public CA.   The FortiGate needs to intercept the HTTPS connections and impersonate the end site because it needs to inject the HTTP messages to redirect the connection to 'https://fortigate_ip:1003' to authenticate the user.  ![]()  To avoid a certificate warning in the browser during the captive portal authentication, it is possible to apply the following procedure: Â
 Â
 ![]() Â
 ![]() Â
 ![]()
 ![]()
If the wildcard certificate was issued by a Public CA, this step can be skipped. However, the issuer of that wildcard certificate [sometimes an intermediate certificate] should be added as 'Remote CA' in the FortiGate if not already there.
Â
 Â
 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 it installed 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: |







