How to Redirect a User to an Error Page, Based on the Source IP Address, by Using SSL-Bridge Virtual Server

How to Redirect a User to an Error Page, Based on the Source IP Address, by Using SSL-Bridge Virtual Server

book

Article ID: CTX139276

calendar_today

Updated On:

Description

This article describes how to redirect a user to an error page or customized response based on a rule that searches a source IP address in a pattern set.


Instructions

To redirect a user to an error page or customize response based on a rule that searches a source IP in a pattern set, complete the following procedure:
  1. Configure a Load Balancing or an SSL virtual sever.

  2. Bind the virtual server with a SSL Certificate under SSL setting.

  3. Do not bind any service to the virtual server.

  4. Bind a listen policy to the virtual server.

    Run the following command to set up the preceding configuration:
    add lb vserver test SSL 10.104.16.122 443 -persistenceType NONE -Listenpolicy "CLIENT.IP.SRC.TYPECAST_TEXT_T.CONTAINS_ANY(\"sslbridge_ip\")" -Listenpriority 1 -redirectURL "http://google.com" -cltTimeout 180
    Note: The preceding command does not have a service bound to it. However, it is bound with a listen policy of sslbridge_IP, which is a pattern set.

    add lb vserver test SSL 10.104.16.122 443 -persistenceType NONE -Listenpolicy "CLIENT.IP.SRC.TYPECAST_TEXT_T.CONTAINS_ANY(\"sslbridge_ip\")" -Listenpriority 1 -redirectURL "http://google.com" -cltTimeout 180

    add lb vserver test SSL 10.104.16.122 443 -persistenceType NONE -Listenpolicy "CLIENT.IP.SRC.TYPECAST_TEXT_T.CONTAINS_ANY(\"sslbridge_ip\")" -Listenpriority 1 -redirectURL "http://google.com" -cltTimeout 180

    When the user logs on from the source IP address defined in listen policy, the user is redirected to the http://google.com page.
  5. Add a second SSL_BRIDGE load balancing virtual server with the same IP address and port. However, do not configure the listen policy for this virtual server.
    Note: This virtual server is for all other traffic that is not part of the pattern set or the listen policy.

  6. Bind the SSL_BRIDGE service to the second load balancing virtual server.
    Note: You can configure two virtual servers listening on the same IP address and port because the listen policy differentiates the two virtual servers.

Issue/Introduction

This article describes how to redirect a user to an error page or customized response based on a rule that searches a source IP address in a pattern set.

Additional Information

Based on requirement, you can modify the listen policy. You can configure listen policy as shown in the following screen shot:

configure listen policy