This topic describes the three WAF 3.0 connection methods: cloud native mode, CNAME record mode, and Hybrid Cloud access. It covers the working principles and setup procedures for each method to help you choose the most suitable option for your web services.
Connection method comparison
|
Item |
Cloud native mode |
CNAME record mode |
Hybrid Cloud access |
|
|
Reverse proxy |
SDK integration |
|||
|
Use cases |
|
Protects services identified by a domain name. This is a versatile method that supports cross-account and multicloud scenarios. |
|
|
|
Protected object |
Alibaba Cloud product instance |
Domain name |
Domain name or IP address |
Domain name or IP address |
|
Limitations |
|
|
|
|
The supported security features vary by connection method. For more information, see the following table.
|
Feature |
Cloud native mode (NLB, CLB, and ECS) |
Cloud native mode (ALB, MSE, FC, APIG or AIG) |
CNAME record mode |
Hybrid Cloud access (reverse proxy) |
Hybrid Cloud access (SDK integration) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Supported only for ALB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Supported only for ALB and APIG |
|
|
|
|
|
|
|
|
|
|
Choose a connection method by asset type
If you are not sure which connection method to use, use the following table to quickly determine the method based on the form of your assets:
|
Asset or service form |
Recommended connection method |
Main limits and considerations |
Instructions |
|
Alibaba Cloud ALB, NLB, CLB, ECS, MSE, Function Compute, APIG, or AIG instances in the current account |
Cloud native mode |
Traffic is automatically routed and no DNS changes are required. ALB uses SDK integration, and ALB separately charges for the WAF-enabled ALB instance. ECS, CLB, and NLB instances of the private network or IPv6 type are not supported. |
|
|
Domain names whose DNS records can be modified, including cross-account, cross-cloud, and non-Alibaba Cloud scenarios |
CNAME record mode |
Applicable to the widest range of scenarios. You must verify domain ownership, modify DNS records, add the WAF origin IP ranges to an allowlist, and have permissions to modify DNS records. |
|
|
Only public IP addresses, no domain names |
Cloud native mode (through ALB, NLB, and so on) or Hybrid Cloud reverse proxy |
CNAME record mode supports only domain names. You can attach the IP address to a cloud product such as ALB or NLB before connection, or use the Hybrid Cloud reverse proxy method. |
Enable WAF protection for an ALB instance and Hybrid cloud access |
|
On-premises IDC, internal services, or WAF deployed on premises |
Hybrid Cloud access (reverse proxy or SDK integration) |
Requires a subscription Enterprise or Ultimate instance and the purchase of Hybrid Cloud nodes. SDK integration is suitable for scenarios that already have a unified access gateway, have large traffic volumes, and have high requirements on latency and stability. |
|
|
A proxy such as CDN or NAT Gateway exists in front of the origin server |
Choose based on the origin type; usually CNAME record mode |
Ensure that the complete traffic path passes through WAF and prevent attackers from bypassing WAF through the public IP address of the origin server. |
|
|
Simple Application Server and other non-standard cloud products |
CNAME record mode |
Supports internet-accessible domain names and does not limit the cloud product type, making it suitable for cross-cloud and cross-account scenarios. |
How to connect
-
Cloud native mode:
-
CNAME record mode:
For more information, see Add a domain to WAF via CNAME record mode. After you add a domain name on the WAF console, you must add the WAF origin IP ranges to your allowlist and modify the DNS settings for the domain name.
-
Hybrid Cloud access (reverse proxy or SDK integration):
For more information, see Hybrid Cloud access.
How it works
Cloud native mode
When you use cloud native mode to connect instances of ALB, FC, MSE, APIG or AIG, WAF uses SDK integration. An SDK embedded in the cloud product extracts, inspects, and protects traffic. Because WAF does not participate in traffic forwarding, this method avoids compatibility and stability issues from an additional forwarding layer.
When you use cloud native mode to connect instances of ECS, CLB, or NLB, WAF uses transparent proxy mode. After you configure a traffic redirection port, the cloud product's gateway automatically modifies the route to redirect web traffic to WAF. WAF blocks attack traffic and forwards legitimate requests to the origin server, participating in both traffic forwarding and protection.
CNAME record mode
This method uses a reverse proxy. After adding a domain name, you point its DNS record to the WAF CNAME address, which redirects all its web traffic to WAF. WAF then inspects the traffic, blocks attacks, and forwards legitimate requests to the origin server.
Hybrid Cloud access
Hybrid Cloud access offers two modes: reverse proxy and SDK integration.
-
Reverse proxy mode: You connect a website domain name or IP address to WAF and then point its DNS record to the WAF protection cluster. All traffic then passes through the cluster for security inspection.
-
SDK integration mode: A plugin deployed on your unified ingress gateway copies service traffic to the WAF protection cluster for inspection. WAF does not forward the traffic, thereby separating the inspection process from the traffic forwarding path.
FAQ
Cross-cloud and cross-account connections
Yes. If you own a domain name and can modify its DNS records, you can use CNAME record mode. This method works regardless of your origin server's location.
Connecting with only a public IP
Yes. You can use cloud native mode, which does not require a domain name.
Connecting IPv6 websites
IPv6 support depends on the connection method:
-
Cloud native mode (ECS, CLB, and NLB instances): IPv6 websites are not supported. To protect IPv6 workloads, you must use CNAME record mode. Subscribe to a subscription Enterprise or Ultimate edition, or a pay-as-you-go edition of WAF, and enable More Settings to turn on IPv6 protection. For detailed steps, see Add a domain to WAF via CNAME record mode.
-
Cloud native mode (instances other than ECS, CLB, and NLB): If the corresponding cloud product instance supports IPv6, WAF also supports IPv6.
-
WAF Outside Chinese Mainland: When you use CNAME record mode, IPv6 websites are not supported.
Using both cloud native mode and CNAME record mode
Not recommended. A domain name can use only one connection method at a time, and adding it twice causes forwarding conflicts and protection failures. To switch a domain from CNAME record mode to cloud native mode, you must first point its DNS record back to the origin server. After the DNS change propagates, delete the CNAME record mode configuration and then add the domain name again in cloud native mode.
Instance not found during configuration
|
Possible cause |
Solution |
|
The CLB, NLB, or ECS instance does not meet the requirements. |
Verify that the instance meets the connection requirements described in Limits for adding CLB instances, Limits for adding NLB instances, and Limits for adding ECS instances. |
|
The CLB instance that you want to add does not have a listener. |
|
|
The CLB, NLB, or ECS instance is not yet synchronized with WAF. |
Follow the instructions in Manually sync assets. |
Viewing and syncing asset status
Follow these steps to view the connection status of your assets.
-
Log on to the Web Application Firewall 3.0 console. From the top menu bar, select the resource group and region (Chinese Mainland or Outside Chinese Mainland) for the WAF instance.
-
In the left navigation pane, click Onboarding.
-
At the top of the page, you can view the number of connected domain name assets and cloud product assets. You can also view the total number of instances that you own for each cloud product. If you recently added or modified a cloud product instance, click Synchronize Assets in the upper-right corner to update WAF immediately.

Connecting a domain to multiple instances
Cloud native mode: Connect all relevant cloud product instances, such as the service ports of CLB instances, at the same time to ensure WAF can redirect traffic to all of them.
CNAME record mode: Add the domain name by using CNAME record mode and configure the origin server with the IP addresses or CNAMEs of all relevant cloud product instances.
Connecting multiple domains to one instance
Cloud native mode: After you add the cloud product instance, WAF protects all associated domain names with its default policy. If you want to configure different protection rules for specific domain names, you must manually add the domain names as protected objects. For more information, see Manually add a protected object.
CNAME record mode: You must add each domain name one by one.
Integration with other products and traffic flow
Yes, WAF can be deployed together with other cloud products. The traffic flow depends on your chosen connection method (CNAME record mode or cloud native mode), as illustrated in the following figures.