Example: Configuring a Redirect URL for Captive Portal (CLI)

You can redirect traffic to the currently connected Infranet Controller or to an IP address or domain name that you specify in a redirect URL. We recommend the default configuration that redirects traffic to the Infranet Controller for authentication.

If you need to override the default redirection destination, you can specify any combination of redirect options:

In this example, you configure the URL to redirect traffic to the Infranet Controller and after authentication forward the traffic automatically to the protected resource.

Before you specify the redirect URL, make sure you configure the captive portal policy. For information about creating the captive portal policy, see Example: Creating a Captive Portal Policy on the JUNOS Enforcer (CLI).

To configure the redirect URL for the captive portal feature on the JUNOS Enforcer:

  1. Navigate to the services unified-access-control level of the configuration hierarchy.
    [edit]user@host# edit services unified-access-control
  2. Specify the redirect URL for the preconfigured captive portal policy.
    [edit services unified-access-control]user@host# set captive-portal my-captive-portal-policy redirect-url https://my-website.com
  3. Navigate to the top level of the configuration hierarchy.
    [edit services unified-access-control]user@host# top
  4. Confirm your configuration by entering the show services command from configuration mode. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.
    [edit]user@host# show servicesunified-access-control {captive-portal my-captive-portal-policy {redirect-url https://my-website.com;}}
  5. Commit the configuration if you are done configuring the device.
    [edit]user@host# commit

For more information about the configuration statements used in this example, see the JUNOS Software CLI Reference.

Related Topics