All Products
Search
Document Center

Bastionhost:Best practices for using a bastion host to perform O&M operations on NAT gateway-protected assets

Last Updated:Mar 31, 2026

NAT Gateway hides the real IP addresses of your assets to block external attacks or work around IP address shortages. This guide shows two ways to configure Bastionhost so it can reach and audit those protected assets.

Choose a solution

SolutionHow it worksBastionhost edition required
Network domain modeMap the elastic IP address (EIP) of an Internet NAT gateway to a proxy server, then import assets by their actual IP addresses through the network domain feature.Enterprise Edition
Direct connection modeAdd assets that share the same public IP address by specifying the EIP and a unique port for each asset.Any edition

Network domain mode simplifies asset management because you import assets by their actual IP addresses rather than by EIP-and-port combinations. If you are running Bastionhost Enterprise Edition and managing a large number of NAT-protected assets, use network domain mode. Otherwise, use direct connection mode.

Network domain mode

Prerequisites

Before you begin, make sure you have:

Configure network domain mode

  1. Log on to the Bastionhost console. In the top navigation bar, select the region where your bastion host resides.

  2. In the bastion host list, find your bastion host and click Manage.

  3. Add the NAT-protected assets to your bastion host. See Add hosts.

  4. In the left-side navigation pane, choose Assets > Network Domain.

  5. On the Network Domain page, click Create Network Domain.

  6. In the Create Network Domain panel, set Connection Method to Proxy.

  7. In the Primary Proxy Server section, click Create Proxy Server. In the dialog box that appears, configure the following parameters.

    ParameterDescription
    Proxy TypeSelect the proxy type. SSH Proxy is recommended for most scenarios.
    Server AddressEnter the IP address of the proxy server.
    Server PortEnter the port of the proxy server.
    Host AccountEnter the username for the proxy server account.
    PasswordEnter the password for the proxy server account.
  8. On the Network Domain page, find the network domain you just created. In the Actions column, click Add Host.

  9. In the Add Host dialog box, select the assets to add and click Add.

  10. In the confirmation message, click Add.

After configuration is complete, use Bastionhost to manage and audit operations on the assets. See O&M overview.

Direct connection mode

Prerequisites

Before you begin, make sure you have configured DNAT on your Internet NAT gateway to provide Internet-facing access to the target assets. See Configure DNAT on an Internet NAT gateway for an ECS instance.

Configure direct connection mode

  1. Log on to the Bastionhost console. In the top navigation bar, select the region where your bastion host resides.

  2. In the bastion host list, find your bastion host and click Manage.

  3. In the left-side navigation pane, choose Assets > Host.

  4. On the Host page, choose Import Other Hosts > Create Host.

  5. In the Create Host panel, configure the following parameters and click Create.

    ParameterDescription
    Operating SystemSelect Linux.
    Host IP AddressEnter the EIP associated with your Internet NAT gateway.
    RemarksEnter a description to identify this asset later.
  6. On the Host page, find the host you created and click the hostname.

  7. On the Service Port tab, enter the port mapped by the DNAT entry and click Update. Repeat steps 4–7 for each additional asset that shares the same EIP, specifying a different DNAT-mapped port for each one.

After configuration is complete, use Bastionhost to manage and audit operations on the assets. See O&M overview.

What's next

  • O&M overview: Start performing and auditing operations on the assets you just added.