Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

How to Automatically Remove the HTTP Redirect Service After the Initial Redirect

In some deployments, you might want to always redirect your subscribers to the captive portal just once each session so that you can serve them advertisements or notifications. Thereafter, you want the subscribers to reach the URL that they specify without additional redirects.

In other deployments, HTTP redirect services might be set up so that the subscriber is redirected multiple times before being able to access the requested URL. For example, after logging in and requesting a URL, the subscriber is redirected to a payment page. After satisfying the payment requirements, the subscriber again requests the URL, but is redirected to an advertisement page, such as for more service offerings. The subscriber must request the URL again to reach the target. In this business case, you might want to simplify access for certain customers by removing the redirect service after the first redirect.

Removal of the redirect service typically requires action by the external policy server such as the PCRF or RADIUS server. For example, the RADIUS server might send a CoA message to deactivate the service. Starting in Junos OS Release 19.4R1, you can configure the router to automatically remove the redirect service when triggered. You can use this automatic method when you do not want the external policy server to be involved in removing the service. The trigger for automatic removal is the initial HTTP GET request from the subscriber. When the subscriber initially requests the URL, the subscriber is redirected once to the captive portal the first time the URL is requested. That Get request causes the router to remove the redirect service, so that the next request for the URL takes the subscriber directly to that location.

Use one of the following methods to configure the automatic removal feature:

  • Enable automatic removal for static redirect services.

  • Disable automatic removal for static redirect services.

  • Enable automatic removal for dynamic redirect services.

  • Disable automatic removal for dynamic redirect services.

For dynamic HTTP redirect services, you can also create a user-defined variable to enable or disable automatic removal. The variable value, initial-get or never, is supplied by either the external policy server or a default value that you define. To use the variable:

  1. Specify the user-defined variable in the dynamic profile.
  2. Configure your external policy server to provide the value. See your server documentation for information about how to do this.
  3. (Optional) Define a default value for the variable.

For example, the following configuration specifies that in the absence of information from the external server, the initial GET message triggers automatic removal of the redirect service.

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
19.4R1
Starting in Junos OS Release 19.4R1, you can configure the router to automatically remove the redirect service when triggered