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

Configuring a NAT Gateway

Updated on 2024-12-02 GMT+08:00

Prerequisites

  • A NAT gateway has been purchased and its VPC has not been associated with any cloud resources (such as cloud servers).
  • If there are no NAT gateways available, buy a public NAT gateway. For details about NAT gateway pricing, see Billing.
CAUTION:

If VPC-NAT is associated with the NAT gateway, a route will be added to the default route table by default. (The destination address is 0.0.0.0/0, and the Next Hop Type is NAT gateway.) This route diverts the traffic destined for VPC-NAT to the NAT gateway. Do not delete it.

Step 1: Configure an SNAT Rule

  1. In the service list, click NAT Gateway under Networking. The Public NAT Gateway page is displayed.
  2. Click the name of a public network NAT gateway. The Basic Information tab is displayed. Click the SNAT Rules tab.
  3. Click Add SNAT Rule. For more information, see Table 1.

    Table 1 Adding an SNAT rule

    Parameter

    Description

    Scenario

    Scenario where the SNAT rule is used. Select VPC.

    CIDR Block

    Select Custom to enable servers in this subnet to use the SNAT rule to access the Internet.

    • Custom: Customize a CIDR block or enter the IP address of a VPC.
      NOTE:

      When you select Custom, you can enter 0.0.0.0/0.

      Only a 32-bit server IP address is supported.

    Public IP Address Type

    Select EIP, which is an EIP for Internet access.

    You can select only an EIP that is not bound to any resource, an EIP that is bound to a DNAT rule whose Port Type is not set to All ports in the current public NAT gateway, or an EIP that is bound to an SNAT rule of the current public NAT gateway.

    You can select multiple EIPs at once. Up to 20 EIPs can be selected for each SNAT rule. If you have selected multiple EIPs for an SNAT rule, one EIP will be chosen randomly.

    Monitoring

    Monitoring of the number of SNAT connections.

    You can set alarm rules to monitor your SNAT connections and keep informed of any changes in a timely manner.

    Description

    Supplementary information about the SNAT rule. Enter up to 255 characters.

Step 2: Configure a VPC-NAT Route Table

  1. In the service list, click Virtual Private Cloud under Networking. In the navigation pane, choose Route Tables.
  2. In the Name column, click the route table name of a VPC. The Summary page is displayed.
  3. Click Add Route. For more information, see Table 2.

    Table 2 Route parameters

    Parameter

    Description

    Destination Type

    Select IP address.

    Destination

    Destination CIDR block. Enter the IP address of VPC1.

    NOTE:

    The value cannot conflict with existing routes or subnet CIDR blocks in the VPC.

    Next Hop Type

    Select Enterprise Router from the drop-down list.

    Next Hop

    Select a resource for the next hop.

    The enterprise routers you created are displayed in the drop-down list.

    Description

    (Optional) Supplementary information about the route.

    NOTE:

    Enter up to 255 characters. Angle brackets (< or >) are not allowed.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback