Building a SaaS WAF Origin Server

Last Updated At: 2025-11-13 14:48:46

When you create a SaaS WAF domain name, you need to enter the origin server address. The origin server address only needs to be connected to the SaaS WAF engine. The origin server IP address can be either a private IP address or a public IP address. Next, an origin server of the private IP address type and an origin server of the public IP address type will be created, respectively.

1. Origin Server with a Private IP Address

  1. Log in to the operation side, select CVM to create a CVM. Click Operation-side Resource and click Create.
  2. After configuring all information on the Create CVM page, view the newly added CVM.
  3. Enter the newly-added CVM.
    ![](When you create a SaaS WAF domain name, you need to enter the origin server address. The origin server address only needs to be connected to the SaaS WAF engine. The origin server IP address can be either a private IP address or a public IP address. Next, an origin server of the private IP address type and an origin server of the public IP address type will be created, respectively.

1. Origin Server with a Private IP Address

  1. Log in to the operation side, select CVM to create a CVM. Click Operation-side Resource and click Create.

  2. After configuring all information on the Create CVM page, view the newly added CVM.

  3. Enter the newly-added CVM.

  4. Install Nginx in the CVM and enter the <1>yum install -y nginx

    Start the Nginx service: service nginx start.
    Check whether port 80 is enabled: netstat -nap|grep nginx.

  5. In the SaaS engine, use the ping or telnet command to test whether the IP address and port of the CVM are connected.

  6. Add a domain name in SaaS WAF. For the origin server IP address, enter the CVM IP address you applied for.

  7. Configure a host and access the newly added domain name. You can access the origin server of the private IP address type.

2. Origin Server with a Public IP Address

  1. Log in to the tenant side, go to the CVM page, select the corresponding region, and click Create.

  2. Select the network consistent with the CLB network, select other options according to the actual situation, and click Next: Select Image.

  3. After selecting the image according to the actual situation, click Next: Select Storage and Bandwidth.

  4. After selecting the storage and bandwidth according to the actual situation, click Next: Set Security Group and Host.

  5. After selecting the security group and host according to the actual situation, enter the host password and click Next: Confirm Configuration Information.

  6. Check the information you just selected. After confirming that everything is correct, click Enable.

  7. Apply for an elastic IP address and bind it to the CVM. Under the CVM menu, click Elastic IP, select the same region as the CVM region, and click Apply. Then select options according to the actual situation.

  8. Click Confirm to return to the Elastic IP List page, and you can see that the created elastic IP address is displayed as Unbound.

  9. Click the Operation column on the Elastic IP page, click More, and select Bind.

  10. Select the CVM you want to bind and click Confirm.

  11. Check the information that needs to be confirmed. After confirming that everything is correct, click Confirm.

  12. Go to the Elastic IP List page. You can see that the created EIP address is displayed as Bound.

  13. Install Nginx, enable port 80, and then click the CVM ID. On the CVM parameter page that appears, copy the server ID of the CVM.

  14. Enter CVM on the operation side, choose VM Management > Tenant-Side Resources, select UUID in the search box, and then paste the server ID you just copied to find the private IP address of the host.

  15. Log in to the private IP address of the host and enter the command: ssh host private IP address. The password is the one entered when you activated CVM.

  16. Enter the virsh console UUID --force command. For example, enter the virsh console 5abe1b63-67e9-4fa3-bcf8-10e208bd0c11 --force command to enter CVM.

  17. After entering CVM, enter the following command to perform an installation:
    Install: <1>yum install -y nginx
    Start the Nginx service: service nginx start.
    Check whether port 80 is enabled: netstat -nap|grep 80.

  18. Since some customers prohibit external access to ports 80 and 443 on their public IP addresses, you need to forward port 80 of the CVM to another port (for example, port 788) through a NATGW, and associate this gateway in the route table (ignore steps 2.18 to 2.26 if it is not involved). Under the VPC menu, select NAT Gateway. After selecting the corresponding region, click Create to create a NAT gateway.

  19. Enter information according to the actual situation and click Create to return to the NAT Gateway List page.

  20. In the created NAT gateway, click the gateway ID.

  21. Click Port Forwarding.

  22. Click Create.

  23. Add a port to be forwarded.

  24. Under VPC, select Route Table. Under the corresponding region, click Create to create a route table.

  25. Enter information and click Create. Select the policy as the added NAT gateway.

  26. A prompt indicates that you need to associate a subnet. After selecting the associated subnet, click OK to return to the Route Table List page.

  27. Visiting http://Public IP Address:788/ to Verify Whether the Website Is Normal

  28. Add a domain name in SaaS WAF. For the origin server IP address, enter the elastic IP address.
    )

  29. Install Nginx in the CVM and enter the <1>yum install -y nginx

    Start the Nginx service: service nginx start.
    Check whether port 80 is enabled: netstat -nap|grep nginx.

  30. In the SaaS engine, use the ping or telnet command to test whether the IP address and port of the CVM are connected.

  31. Add a domain name in SaaS WAF. For the origin server IP address, enter the CVM IP address you applied for.

  32. Configure a host and access the newly added domain name. You can access the origin server of the private IP address type.

2. Origin Server with a Public IP Address

  1. Log in to the tenant side, go to the CVM page, select the corresponding region, and click Create.

  2. Select the network consistent with the CLB network, select other options according to the actual situation, and click Next: Select Image.

  3. After selecting the image according to the actual situation, click Next: Select Storage and Bandwidth.

  4. After selecting the storage and bandwidth according to the actual situation, click Next: Set Security Group and Host.

  5. After selecting the security group and host according to the actual situation, enter the host password and click Next: Confirm Configuration Information.

  6. Check the information you just selected. After confirming that everything is correct, click Enable.

  7. Apply for an elastic IP address and bind it to the CVM. Under the CVM menu, click Elastic IP, select the same region as the CVM region, and click Apply. Then select options according to the actual situation.

  8. Click Confirm to return to the Elastic IP List page, and you can see that the created elastic IP address is displayed as Unbound.

  9. Click the Operation column on the Elastic IP page, click More, and select Bind.

  10. Select the CVM you want to bind and click Confirm.

  11. Check the information that needs to be confirmed. After confirming that everything is correct, click Confirm.

  12. Go to the Elastic IP List page. You can see that the created EIP address is displayed as Bound.

  13. Install Nginx, enable port 80, and then click the CVM ID. On the CVM parameter page that appears, copy the server ID of the CVM.

  14. Enter CVM on the operation side, choose VM Management > Tenant-Side Resources, select UUID in the search box, and then paste the server ID you just copied to find the private IP address of the host.

  15. Log in to the private IP address of the host and enter the command: ssh host private IP address. The password is the one entered when you activated CVM.

  16. Enter the virsh console UUID --force command. For example, enter the virsh console 5abe1b63-67e9-4fa3-bcf8-10e208bd0c11 --force command to enter CVM.

  17. After entering CVM, enter the following command to perform an installation:
    Install: <1>yum install -y nginx
    Start the Nginx service: service nginx start.
    Check whether port 80 is enabled: netstat -nap|grep 80.

  18. Since some customers prohibit external access to ports 80 and 443 on their public IP addresses, you need to forward port 80 of the CVM to another port (for example, port 788) through a NATGW, and associate this gateway in the route table (ignore steps 2.18 to 2.26 if it is not involved). Under the VPC menu, select NAT Gateway. After selecting the corresponding region, click Create to create a NAT gateway.

  19. Enter information according to the actual situation and click Create to return to the NAT Gateway List page.

  20. In the created NAT gateway, click the gateway ID.

  21. Click Port Forwarding.

  22. Click Create.

  23. Add a port to be forwarded.

  24. Under VPC, select Route Table. Under the corresponding region, click Create to create a route table.

  25. Enter information and click Create. Select the policy as the added NAT gateway.

  26. A prompt indicates that you need to associate a subnet. After selecting the associated subnet, click OK to return to the Route Table List page.

  27. Visiting http://Public IP Address:788/ to Verify Whether the Website Is Normal

  28. Add a domain name in SaaS WAF. For the origin server IP address, enter the elastic IP address.