• Bare Metal Server

  1. Help Center
  2. Bare Metal Server
  3. User Guide
  4. Virtualization
  5. XenServer on BMS
  6. (Optional) Creating a NAT Gateway and Adding a DNAT Rule

(Optional) Creating a NAT Gateway and Adding a DNAT Rule

Skip this section if service VMs in the user-defined network do not need to communicate with the Internet.

If service VMs in the user-defined network need to provide services to the Internet, create a NAT gateway and add a DNAT rule so that BMSs can share an EIP to reduce management cost.


  1. Log in to the management console.
  2. Choose Service List > Network > NAT Gateway.

    The NAT Gateway console is displayed.

  3. Click Create NAT Gateway in the upper right corner.
  4. Configure required parameters.

    • Region: Select the region to which the BMS created in section Allocating a BMS belongs.
    • Name: Enter a name as needed, for example, nat-5c15.
    • VPC: Select the VPC created in section Preparing for the Deployment.

      The BMS, user-defined network, and NAT gateway must be in the same VPC.

    • Subnet: Select a subnet as needed.
    • Type: Select a type as needed.
    • Description: Enter description as needed.
  5. Click Create Now. Confirm specifications and click Submit.

    After the NAT gateway is created successfully, it is displayed in the list of NAT gateways.

  6. Click the NAT gateway name nat-5c15 to enter the page showing details of the NAT gateway.
  7. Click the DNAT Rules tab and then Add DNAT Rule, and specify the following information.

    You must add a DNAT rule for the virtual NIC IP address of each VM.

  8. Click OK.

After the preceding operations are complete, service VMs can communicate with the Internet and the XenServer on BMS solution is deployed successfully.