All Products
Search
Document Center

Cloud Firewall:Configure access control policies in scenarios in which Cloud Firewall is deployed together with Bastionhost

Last Updated:Mar 31, 2026

When Cloud Firewall and Bastionhost are deployed together, the Internet firewall blocks Bastionhost traffic by default. This topic explains how to configure inbound and outbound access control policies to keep Bastionhost fully operational while Cloud Firewall protection remains active.

Prerequisites

Before you begin, ensure that you have:

How it works

Architecture diagram

Cloud Firewall sits at the Internet boundary and inspects all traffic entering and leaving your Bastionhost instance. Without explicit allow policies, the Internet firewall denies Bastionhost traffic by default, causing the following issues:

  • Service ports become inaccessible

  • Assets and users cannot be imported

  • Web page-based O&M cannot be performed

  • Videos cannot be played

To resolve this, configure two allow policies — one inbound and one outbound — before enabling Internet firewall protection for the Bastionhost instance.

Overview of required policies

The following table lists all policies you need to create. Configure them in the order shown.

StepDirectionSourceDestinationPortsProtocolActionPriority
1aInboundAllowed public CIDR blocksBastionhost O&M IP60022, 63389, 9443, 443, 20045TCPAllowHighest
1bInbound0.0.0.0/0AnyAnyAnyDenyLowest
2aOutboundBastionhost egress IPsAlibaba credible domains443, 80TCPAllowHighest
2bOutbound0.0.0.0/0AnyAnyAnyDenyLowest
Important

Create all four policies before enabling Internet firewall protection in Step 3. Enabling protection before the allow policies are in place will immediately block all Bastionhost traffic.

Procedure flowchart

Step 1: Create an inbound policy

Configure an inbound policy on the Internet firewall to allow traffic from authorized public IP addresses to reach the open ports of your Bastionhost instance.

  1. Log on to the Cloud Firewall console.

  2. In the left-side navigation pane, choose Prevention Configuration > Access Control > Internet Border.

  3. On the Inbound tab, click Create Policy.

  4. In the Create Inbound Policy panel, click the Create Policy tab and configure the following parameters. Then click OK.

    Note

    To allow multiple ports without listing them individually, create an address book containing all required ports and select it as the Port type.

    ParameterValueWhy
    Source typeIPRestricts access to specific IP ranges you control.
    SourceEnter the public CIDR blocks allowed to access the Bastionhost instance.Only your authorized networks can reach the bastion host.
    Destination typeIPTargets the specific IP address of the Bastionhost instance.
    DestinationEnter the IP address to which the O&M address of the Bastionhost instance is resolved. To find this IP address, go to the Internet Border page and filter by Asset Type. You do not need to log on to the Bastionhost console.Ensures the policy targets only the Bastionhost instance.
    Protocol typeTCPAll Bastionhost services use TCP.
    Port typePort or Address BookSelect Address Book to allow all required ports at once using a pre-configured address book. Select Port to specify ports individually.
    PortSpecify ports based on the services to allow. Bastionhost uses the following default ports: SSH-based O&M: 60022, Remote Desktop Protocol (RDP)-based O&M: 63389, Video playback: 9443, Host O&M and O&M portal: 443, Bastionhost Assistant: 20045Each port corresponds to a specific Bastionhost function. Open only the ports your use case requires.
    ApplicationANYAllows all application-layer protocols on the specified ports.
    ActionAllowPermits the specified CIDR blocks to reach the open ports of the Bastionhost instance.
    DescriptionEnter a description to identify this policy.Helps you manage policies as their number grows.
    PriorityHighestEnsures this allow policy is evaluated before the deny-all policy you create next.
    Enabling statusOnActivates the policy immediately after creation.
  5. Create a deny-all inbound policy to block all other public traffic. Click Create Policy again and configure the following parameters: Leave all other parameters at their defaults.

    • Source: 0.0.0.0/0

    • Priority: Lowest

    • Action: Deny

Step 2: Create an outbound policy

The Bastionhost instance needs to reach Alibaba Cloud services over the Internet — for example, to import assets and users. Configure an outbound policy to allow this traffic.

  1. On the Outbound tab, click Create Policy.

  2. In the Create Outbound Policy panel, click the Create Policy tab and configure the following parameters. Then click OK.

    ParameterValueWhy
    Source typeIPTargets traffic originating specifically from the Bastionhost instance.
    SourceEnter the egress IP addresses of the Bastionhost instance.Ensures only Bastionhost traffic is covered by this allow policy.
    Destination typeAddress BookCovers the full range of Alibaba Cloud service endpoints without manual IP maintenance.
    DestinationIn the Select Address Book panel, select Cloud Service Address Book and search for Alibaba credible domains.Covers all Alibaba Cloud service domains that Bastionhost relies on.
    Protocol typeTCPAlibaba Cloud services are accessed over TCP.
    Port typePort or Address BookSelect Address Book to group ports for batch management.
    Port443 and 80Port 443 (HTTPS) and port 80 (HTTP) are the standard ports for cloud service API communication.
    ApplicationHTTP and HTTPSMatches the application protocols used by Alibaba Cloud service endpoints.
    ActionAllowPermits the Bastionhost instance to reach Alibaba Cloud service endpoints.
    DescriptionEnter a description to identify this policy.Helps you manage policies as their number grows.
    PriorityHighestEnsures this allow policy is evaluated before the deny-all policy you create next.
    Enabling statusOnActivates the policy immediately after creation.
  3. Create a deny-all outbound policy to block all other Internet traffic from the Bastionhost instance. Click Create Policy again and configure the following parameters:

    • Source: 0.0.0.0/0

    • Priority: Lowest

    • Action: Deny

Step 3: Enable the Internet firewall for the Bastionhost instance

After creating all four policies, enable Internet firewall protection for the Bastionhost instance.

  1. In the left-side navigation pane, click Firewall Settings.

  2. On the Internet Firewall tab, locate the IP address of the Bastionhost instance and click Enable Protection in the Actions column.

Note

If the Bastionhost instance was recently purchased, its information is synchronized to Cloud Firewall after approximately 15 to 30 minutes. If the instance does not appear in the list, wait and refresh the page.

After protection is enabled, Cloud Firewall inspects all Bastionhost traffic using the policies you configured. The policies allow legitimate O&M traffic through while blocking everything else.

Step 4: Verify the configuration

Confirm that the policies are working correctly by checking the following:

  • The service ports of the Bastionhost instance are accessible.

  • Assets and users can be imported.

  • Web page-based O&M works as expected.

  • Videos can be played.

To review traffic logs, go to the Log Audit page in the Cloud Firewall console and open the Traffic Logs tab. For more information, see Log audit.