El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page
Help Center/ Cloud Connect/ Best Practices/ Using a Cloud Connection and DNAT to Enable the Internet to Access Private Networks

Using a Cloud Connection and DNAT to Enable the Internet to Access Private Networks

Updated on 2025-01-15 GMT+08:00

Scenarios

  • This practice provides detailed operations for the Internet outside the Chinese mainland to access private networks.
  • DNAT rules are required so that ECSs in the VPCs in the Chinese mainland can provide services accessible from the Internet.
NOTE:

For details about the regions where cloud connections are available, see Region Availability.

Figure 1 shows an example.

Figure 1 Enabling access from the Internet
NOTE:

In this practice, suppose that the VPC in CN East-Shanghai1 is the on-premises network.

The CIDR block of the Internet outside the Chinese mainland is 0.0.0.0/0.

Your account must have the permission for cross-border communication. If your account does not have the permission, you can ask the other user with the required permission to load the VPCs.

Procedure

  1. Create the following VPCs and ensure that the VPC CIDR blocks do not conflict with each other:

    • VPC in CN East-Shanghai1: 172.16.36.0/24
    • VPC in CN-Hong Kong: 192.168.120.0/24

    For details, see Creating a VPC.

  1. Create a cloud connection.

    1. Create a cloud connection.

      For details, see Creating a Cloud Connection.

    2. Load the VPCs.

      For details, see Loading a Network Instance.

    3. Add custom CIDR blocks.

      For details, see Adding Custom CIDR Blocks for a Cloud Connection.

      When you load the VPC in CN-Hong Kong, you need to add the custom CIDR block 0.0.0.0/0.

      NOTE:

      You need to add the default route 0.0.0.0/0 to allow access from the NAT gateway.

    4. Buy a bandwidth package.

      By default, a cloud connection provides 10 kbit/s of bandwidth for testing cross-region network connectivity. You need to buy a bandwidth package to ensure normal communication across regions.

      For details, see Buying a Bandwidth Package.

    5. Assign an inter-region bandwidth.

      For details, see Assigning an Inter-Region Bandwidth.

  1. Buy an ECS in CN East-Shanghai1.

    For details, see Purchasing an ECS.

    Private IP address of the ECS in CN East-Shanghai1: 172.16.36.220

  2. Buy an EIP and configure a NAT gateway.

    In CN-Hong Kong, buy an EIP and a public NAT gateway, and add a DNAT rule. Select Direct Connect/Cloud Connect when you add the DNAT rule.

    For details, see Assigning an EIP and Binding It to an ECS and Adding a DNAT Rule.

    Set the private IP address to 172.16.36.220 when you add the DNAT rule.

    NOTE:

    The DNAT rule enables the ECS to provide services accessible from the Internet.

Verification

Test network connectivity.

Ping the EIP bound to the DNAT rule and the port used by the EIP from any client on the Internet.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback