Using CFW and EIP to Control Public Network Access to Cloud Desktops
Scenarios
This section explains how to enforce network access control for cloud desktops to manage both Layer 4 (IP address and port) and Layer 7 (application and domain name) traffic on the public network.
Procedure
- Log in to the console.
- Enable Internet access for cloud desktops based on service requirements. For details, see Enabling Enhanced Internet Access (NAT Gateway+EIP).
- Purchase a CFW instance (standard edition in this example) by referring to Purchasing and Modifying CFW. For details about the differences between different specifications, see CFW Functions.
- In the navigation pane, choose Assets > EIPs. The EIPs page is displayed. The EIP information (both IPv4 and IPv6) is automatically updated to the list.
- Locate the EIP created in 2 and click Enable Protection in the Operation column.

- In the navigation pane, choose Access Control > Internet Border Protection Rules.
- On the Protection Rules page, click Add. In the displayed Add Rule dialog box, enter the protection information and configure the protection rule based on the actual service deployment.
The following steps illustrate how to configure a rule to deny access to the Internet and allow access only to Huawei Cloud websites.
- Configure a rule to block all traffic destined for the public network. Figure 2 Configuring a rule
Table 1 Rule parameters Parameter
Example
Description
Direction
Inbound
Direction of the protected traffic.
Source
Any
Origin of network traffic.
Destination
Any
Receiver of network traffic.
Service
Any
Protocol, source port, and destination port of network traffic.
Application
Any
Protection policy for application layer protocols.
Protection Action
Blocked
Action taken when traffic passes through the firewall.
- Add another rule to allow access to all Huawei Cloud websites. Figure 3 Configuring a rule
Table 2 Rule parameters Parameter
Example
Description
Direction
Outbound
Direction of the protected traffic.
Source
Any
Origin of network traffic.
Destination
Select Application Domain Name from the drop-down list and enter *.huaweicloud.com,huaweicloud.com,*.myhuaweicloud.com,*.hc-cdn.com,*.hc-cdn.cn.
Receiver of network traffic.
Note: You can use application domain name groups for centralized management.
Service
- Service: Service
- Protocol: TCP
- Source Port: 1-65535
- Destination Port: 1-65535
Protocol, source port, and destination port of network traffic.
Application
Select Application and choose HTTP and HTTPS from the drop-down list.
Protection policy for application layer protocols.
Protection Action
Allowed
Action taken when traffic passes through the firewall.
- View the rule hits in access control logs. In the navigation pane, choose Log Audit > Log Query. Click the Access Control Logs tab.
In the rows where Destination IP is a domain name matching huaweicloud.com, the corresponding Action is Allowed. For other traffic, the Action is Blocked.
Figure 4 Viewing logs
Feedback
Was this page helpful?
Provide feedbackThank 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