Step 1: Adding a Website to WAF (ELB Mode)

If your service servers are deployed on HUAWEI CLOUD, you can add the domain name or IP address of the website to WAF so that the website traffic is forwarded to WAF for inspection.

  • Before you purchase a dedicated or load-balancing WAF instance, submit a service ticket to apply for enabling WAF dedicated or ELB mode. Otherwise, you cannot buy dedicated or load-balancing WAF instances.
  • Load-balancing WAF instances are available in the CN North-Beijing4 region only.

If you have enabled enterprise projects, you can select an enterprise project from the Enterprise Project drop-down list and add websites to be protected in the project.

Prerequisites

  • You have purchased a load balancing WAF instance.
  • The domain name has been registered with the ICP license and has not been added to WAF.

Constraints

Domain names of the websites to be protected must have ICP licenses. Otherwise, the domain names cannot be added to WAF.

Collecting Domain Name/IP Address Details

Before adding a domain name or IP address, obtain the information listed in Table 1.

Table 1 Domain name or IP address details required

Parameter

Description

Example Value

Domain Name/IP Address

  • Domain name: used by visitors to access your website. A domain name consists of letters separated by dots (.). It is a human readable address that maps to the machine readable IP address of your server.
  • IP: IP address of the website.

www.example.com

Standard/Non-standard Port

The service port corresponding to the domain name of the website you want to protect.

  • Standard ports
    • 80: default port when the client protocol is set to HTTP
    • 443: default port when the client protocol is set to HTTPS
  • Non-standard ports

    Ports other than ports 80 and 443. This port must be the same as the listener port you configured for the ELB load balancer you use for WAF.

    NOTICE:

    To configure a non-standard port for the domain name, check whether the WAF edition you plan to buy can protect the non-standard port before you make a purchase. For details, see Which Non-Standard Ports Can WAF Protect?

80

Procedure

  1. Log in to the management console.
  2. Go to the Website Settings page by following the steps shown in Figure 1.

    Figure 1 Accessing to the Website Settings page

  3. In the upper left corner of the website list, click Add Website.
  4. Select ELB mode and configure basic domain name information by referring to Table 2. Figure 2 shows an example.

    Figure 2 Configuring basic settings of a website
    Table 2 Parameter description

    Parameter

    Description

    Example Value

    Website Name

    Name of the website you want to protect

    None

    Domain Name

    The domain name of a website to be protected. It can be a single domain name or a wildcard domain name.

    • Single domain name: Enter a single domain name. For example, www.example.com.
    • Wildcard domain name
      NOTE:

      Wildcard domain names cannot contain underscores (_).

      • If the server IP address of each subdomain name is the same, enter a wildcard domain name to be protected. For example, if the subdomain names a.example.com, b.example.com, and c.example.com have the same server IP address, you can add the wildcard domain name *.example.com to WAF to protect all three.
      • If the server IP addresses of subdomain names are different, add subdomain names as single domain names one by one.

    Single domain name: www.example.com

    Wildcard domain name: *.example.com

    IP Address:

    XXX.XXX.1.1

    Port

    (Optional) The port must be the same as the listener port for the load balancer you configure for the WAF instance.

    To configure a port other than 80 and 443, select Non-standard port. Value range: 1 to 65535

    NOTE:

    If a non-standard port is configured, the visitors need to add the non-standard port to the end of the website address when they access the website. Otherwise, a 404 error will occur.

    81

    Website Remarks

    Brief description of the website

    -

    Instance Group

    The instance group associated with the protected website. You can create an instance group. For details, see Creating an Instance Group.

    waf_elb

  5. Select a policy. By default, system-generated policy is selected.

    You can select a policy you configured. You can also customize rules after the domain name is connected to WAF.

    System-generated policies:

    • Basic web protection (Log only mode and common checks)

      The basic web protection defends against attacks such as SQL injections, XSS, remote overflow vulnerabilities, file inclusions, Bash vulnerabilities, remote command execution, directory traversal, sensitive file access, and command/code injections.

    • Anti-crawler (Log only mode and Scanner feature)

      WAF only logs web scanning tasks, such as vulnerability scanning and virus scanning, such as crawling behavior of OpenVAS and Nmap.

    Log only: WAF only logs detected attack events instead of blocking them.

  6. Click OK.

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

Verification

The initial Access Status of a website is Inaccessible. If the access status of the website changes to Accessible, then the website is connected to WAF. When a request reaches the WAF instance for the website, the access status automatically changes to Accessible.