Configuring a portal Web server
The device supports multiple portal Web servers.
Perform this task to configure the following portal Web server parameters:
VPN instance of the portal Web server.
URL of the portal Web server.
Parameters carried in the URL when the device redirects the URL to users.
Portal Web server type, which must be the same as the server type the device actually uses.
The captive-pass feature.
With this feature enabled, the device does not automatically push the portal authentication page to iOS devices and some Android devices when they are connected to the network. The device pushes the portal authentication page only when the user accesses the Internet by using a browser.
URL redirection match rule.
A URL redirection match rule matches HTTP or HTTPS requests by user-requested URL or User-Agent information, and redirects the matching HTTP or HTTPS requests to the specified redirection URL.
For a user to successfully access a redirection URL, configure a portal-free rule to allow HTTP or HTTPS requests destined for the redirection URL to pass. For information about configuring portal-free rules, see the portal free-rule command.
The url command redirects all HTTP or HTTPS requests from unauthenticated users to the portal Web server for authentication. The if-match command allows for flexible URL redirection by redirecting specific HTTP or HTTPS requests to specific redirection URLs. If both commands are configured for a portal Web server, the if-match command takes priority to perform URL redirection.
The device does not detect the reachabiity of the redirection URL configured by the if-match command. If the if-match command rather than the url command is configured to redirect HTTP requests to portal Web servers, the device does not trigger the following features:
The fail-permit feature for the portal Web servers.
The switch between primary and backup portal Web servers.
To configure a portal Web server:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Create a portal Web server and enter its view. | portal web-server server-name | By default, no portal Web servers exist. |
3. Specify the VPN instance to which the portal Web server belongs. | vpn-instance vpn-instance-name | By default, the portal Web server belongs to the public network. |
4. Specify the URL of the portal Web server. | url url-string | By default, no URL is specified. |
5. Configure the parameters to be carried in the URL when the device redirects it to users. | url-parameter param-name { nas-id | nas-port-id | original-url | source-address | ssid | { ap-mac | source-mac } [ encryption { aes | des } key { cipher | simple } string ] | value expression } | By default, no redirection URL parameters are configured. |
6. (Optional.) Specify the portal Web server type. | server-type imc | By default, the portal Web server type is IMC. |
7. (Optional.) Enable the captive-pass feature. | captive-bypass [ optimize ] enable | By default, the captive-bypass feature is disabled. The device automatically pushes the portal authentication page to the iOS devices and some Android devices when they are connected to the network. |
8. (Optional.) Configure a match rule for URL redirection. | if-match { original-url url-string redirect-url url-string [ url-param-encryption { aes | des } key { cipher | simple } string ] | user-agent string redirect-url url-string } | By default, no URL redirection match rules exist. |