Step 1: Add a Domain Name/IP Address to WAF
- If your website is using a proxy such as Elastic Load Balance (ELB), select Yes for Use Layer-7 Proxy to ensure that WAF security policies work on the real source IP address. If you select No, WAF cannot obtain the real IP address of a request from a web visitor.
- If a domain name uses different ports, each combination of the domain name plus a port is a unique protected object.
For example, www.example.com:8080 and www.example.com:8081 are two different protection objects and are both counted toward object quota. If you want to protect web services over multiple ports with the same domain name, add the domain name and each port to WAF.
- You can enter a multi-level single domain name (for example, top-level domain name example.com or second-level domain name www.example.com) or a wildcard domain name (*.example.com).
| Parameter | Parameter | Description | Example Value |
|---|---|---|---|
| Protected Objects | - |
|
|
| Protected Port | - | The service port corresponding to the domain name of the website you want to protect.
| 80 |
| Server Configuration | Client Protocol | Protocol used by a client (for example, a browser) to access the website. WAF supports HTTP and HTTPS. | HTTP |
| Server Protocol | Protocol used by WAF to forward requests from the client (such as a browser). The options are HTTP and HTTPS. | HTTP | |
| Server Address | Private IP address of the website server. Log in to the ECS or ELB console and view the private IP address of the server in the instance list. | XXX.XXX.1.1 | |
| VPC | Select the VPC to which the dedicated WAF instance belongs. | vpc-default | |
| Server Port | Port used by WAF to forward client requests to the server | 80 | |
| (Optional) Certificate Name | - | If you set Client Protocol to HTTPS, you are required to configure a certificate on WAF and associate the certificate with the domain name. NOTICE:
| - |
| Use Layer-7 Proxy | - | If your website is using a proxy such as Elastic Load Balance (ELB), select Yes to ensure that WAF security policies work on real source IP addresses, or WAF cannot obtain the real IP address of a request from a web visitor. | - |
- Configuration for port 80/443
- Protected Port: Select Standard port.
- Client Protocol
- Protection for port 80: Select HTTP.
- Protection for port 443: Select HTTPS.
- Protection for both ports 80 and 443: Configure two pieces of server information and set Client Protocol to HTTP and HTTPS, respectively, as shown in Figure 1.
- In Figure 1, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- In this case, your website visitors can access the website without adding a port to the end of the domain name. For example, they can enter http://www.example.com in the address box of the browser to access the website.
- Forwarding client requests to different origin servers
Configuration scenario: Using WAF to distribute client requests for the same protected object across different origin servers.
For example, you want to add domain name www.example.com and port 8080 to WAF, and want to let WAF forward client requests to two backend servers.
- Domain Name: www.example.com
- Protected Port: 8080
- Client Protocol: WAF auto-fills the client protocol based on the protected port you select. Only HTTP supports port 8080. So, Client Protocol must be to HTTP for the two pieces of origin server information. Figure 2 shows an example.
- In Figure 2, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- In this scenario, visitors need to add a port number to the end of the domain name when they try to access the website. Otherwise, error 404 will be reported. For example, they need to enter http://www.example.com:8080 in the address box of the browser to access the website.
- Protection for one domain name with different protected ports
Each combination of a domain name and a non-standard port is counted towards the domain name quota of the WAF edition you are using. For example, www.example.com:8080 and www.example.com:8081 use two domain names of the quota. If you want to protect web services over multiple ports with the same domain name, add the domain name and each port to WAF.
WAF provides various protocol types. Take www.example.com as an example. WAF supports the following four forwarding methods:
- In HTTP forwarding mode, set both Client Protocol and Server Protocol to HTTP, as shown in Figure 3. In this scenario, the client accesses the website over HTTP, and WAF forwards requests to the origin server over HTTP. So, this mode is suitable when encrypted transmission is not required.
- In Figure 3, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- This configuration allows web visitors to access the website over HTTP only. If they access it over HTTPS, they will receive the 302 Found code and be redirected to http://www.example.com.
- In HTTPS forwarding, HTTPS is set to Client Protocol and Server Protocol, as shown in Figure 4. This configuration allows web visitors to access your website over HTTPS only. If they access over HTTP, they are redirected to https://www.example.com. In this scenario, the client accesses the website over HTTPS, and WAF forwards requests to the origin server over HTTPS as well. So, this mode is suitable when encrypted transmission is required.
- In Figure 4, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- If visitors access your website over HTTPS, the website returns a successful response.
- If visitors access your website over HTTP, they will receive the 301 Found code and are directed to https://www.example.com.
- In HTTP and HTTPS forwarding, configure two pieces of server configurations, one with Client Protocol and Server Protocol set to HTTP, and the other with Client Protocol and Server Protocol set to HTTPS, as shown in Figure 5. This configuration applies only to protection for standard ports 80 and 443.
- In Figure 5, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- If visitors access your website over HTTP, the website returns a successful response. Communications between the browser and website are not encrypted.
- If visitors access your website over HTTPS, the website returns a successful response and all communications between the browser and website are encrypted.
- If you want to use WAF for HTTPS offloading, select HTTPS for Client Protocol and HTTP for Server Protocol, as shown in Figure 6. In this scenario, when a client accesses a website, HTTPS is used for encrypted transmission, and WAF uses HTTP to forward requests to the origin server.
- In Figure 6, the parameter settings in the red box are fixed. Set other parameters based on site requirements.
- If visitors access your website over HTTPS, WAF forwards the requests to your origin server over HTTP.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot





