Skip to main content
sthapa
Staff
Staff
April 3, 2019

Technical Tip: Redirect captive portal user to a custom URL after the successful authentication

  • April 3, 2019
  • 0 replies
  • 17086 views

Description

 

This article describes how to redirect a captive portal user to a custom URL after successful authentication.

 

Scope

 

FortiGate.

Solution


The following CLI commands explain how to redirect a captive portal user to a specific URL after successful authentication

Enable the 'auth-keepalive' option after the successful authentication, which enables the session to always redirect to a keep-alive page only, then manually select the 'new window' tab to open the custom page

In this scenario, it is necessary to disable the auth-keepalive page under the global settings to make this configuration effective.


To disable the auth-keepalive option:

 

config system global
    set auth-keepalive disable
end


config system interface
    edit <Interface_name>
        set security-redirect-url <Redirect_URL>
end


If the captive portal is enabled in a firewall policy instead of a LAN interface, then it is possible to add the redirection like below:

 

config firewall policy
    edit 1
        set redirect-url <Redirect_URL>

    next

end