Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Example Configuration

Updated on 2024-09-19 GMT+08:00

When adding a domain name to WAF, the configurations are slightly different based on the service scenarios.

Example 1: Configuring Service Protection for Port 80/443

Configuration scenario: Protection for web services over port 80 or 443

  1. Protected Port: Select Standard port.
  2. 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.
      Figure 1 Protection for both ports 80 and 443
      NOTE:
      • 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.

Example 2: 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.

  1. Domain Name: www.example.com
  2. Protected Port: 8080
  3. Client Protocol: SecMaster 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 Forwarding client requests to different origin servers
    NOTE:
    • 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.

Example 3: 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.

Example 4: Configuring Protocols for Different Access Methods

WAF provides flexible combinations of protocol configurations. If your website is www.example.com, WAF provides the following four access modes:

  • 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.
    Figure 3 HTTP forwarding
    NOTICE:
    • 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.
    Figure 4 HTTPS redirection
    NOTICE:
    • 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.
    Figure 5 HTTP and HTTPS forwarding
    NOTICE:
    • 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.
    Figure 6 HTTPS offloading
    NOTICE:
    • 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback