Help Center> Web Application Firewall> FAQ> Website Domain Name Access Configuration> Domain Name and Port Configuration> How Do I Use a Dedicated WAF Instance to Protect Non-Standard Ports That Are Not Supported by the Dedicated Instance?

How Do I Use a Dedicated WAF Instance to Protect Non-Standard Ports That Are Not Supported by the Dedicated Instance?

To use a dedicated WAF instance to protect a non-standard port that is not supported by dedicated instance, configure an ELB load balancer to distribute traffic to any non-standard port that is supported by the dedicated instance. For supported non-standard ports, see Which Non-Standard Ports Does WAF Support?

For example, a client sends requests over HTTP to the dedicated WAF instance, and you protect the website whose domain name is www.example.com:1234. The dedicated instance cannot protect non-standard port 1234. In this case, you can configure a load balancer to distribute traffic to any other non-standard port (for example, port 81) that can be protected by the dedicated instance. In this way, traffic designated to non-standard port 1234 will be checked by WAF.

To ensure that the configuration takes effect, set Domain Name to the wildcard domain name corresponding to the protected domain name. For example, if you want to protect www.example.com:1234, set Domain Name to *.example.com.

Perform the following steps:

  1. Log in to the management console.
  2. Add the domain name of the website you want to protect on the WAF console.

    1. Go to the Website Settings page by following the steps shown in Figure 1.
      Figure 1 Accessing to the Website Settings page
    2. In the upper left corner of the website list, click Add Website. On the displayed page, select Dedicated mode, enter the wildcard domain name *.example.com corresponding to www.example.com:1234 in the Domain Name text box, and select Non-standard Port. Then, select a port (for example, 81) from the Port drop-down list. Figure 2 shows the example.
      Figure 2 Adding a wildcard domain

    3. Select Yes for Proxy Configured and click OK.
    4. Click OK.
    5. Close the dialog box displayed.

      You can view the added websites in the protected website list.

  3. Configure a load balancer on the ELB console.

    1. Click in the upper left corner of the page and choose Elastic Load Balance under Network to go to the Load Balancers page.
    2. Click the name of the load balancer you want in the Name column to go to the Basic Information page.
    3. Select the Listeners tab, click Add Listener, and configure the listener port to 1234. Figure 3 shows the example.
      Figure 3 Configuring a listener
    4. Click Next, and then click Finish.
    5. After the listener is added, click OK.
    6. Select the added listener. In the right area of the page, select the Backend Server Groups tab and click Add.
    7. In the Add Backend Server dialog box, select the dedicated WAF instance you have purchased.
    8. Click Next and configure port 81 (the same non-standard port in 2.b ) for the dedicated instance. Figure 4 shows the example.
      Figure 4 Configuring a backend port
    9. Click Finish.

  4. Unbind an elastic IP address (EIP) from the origin server and bind the EIP to the load balancer configured for the dedicated WAF instance.

    For more details, see Binding an EIP to a Load Balancer.