- Visão geral de serviço
- No momento, o conteúdo não está disponível no seu idioma selecionado. Consulte a versão em inglês.
- What's New
- Function Overview
- Billing
-
Getting Started
- Using a Public NAT Gateway to Enable Servers to Share One or More EIPs to Access the Internet
- Using a Public NAT Gateway to Enable Servers to Be Accessed by the Internet
- Using a Private NAT Gateway to Connect Cloud and On-premises Networks
- Using Multiple Public NAT Gateways Together in Performance-Demanding Scenarios
-
User Guide
- Public NAT Gateways
- Private NAT Gateways
- Permissions Management
- Tag Management
- Managing Quotas
- Monitoring
- Auditing
-
Best Practices
- Enabling Private Networks to Access the Internet Using a Cloud Connection and SNAT
- Using a Public NAT Gateway and Direct Connect to Accelerate Internet Access
- Using a Private NAT Gateway and Direct Connect to Enable Communications Between a VPC and an On-premises Data Center
- Using a Public NAT Gateway and VPC Peering to Enable Communications Between VPCs and the Internet
- Preserving Your Network with NAT Gateways During Cloud Migration
-
API Reference
- Before You Start
- API Overview
- Calling APIs
- APIs of Public NAT Gateways
- APIs for Private NAT Gateways
- Application Examples
- Permissions Policies and Supported Actions
- Appendixes
- Out-of-Date APIs
- SDK Reference
-
FAQs
-
Public NAT Gateways
- What Is the Relationship Between a VPC, Public NAT Gateway, EIP Bandwidth, and ECS?
- How Does a Public NAT Gateway Offer High Availability?
- Which Ports Cannot Be Accessed?
- What Are the Differences Between Using a Public NAT Gateway and Using an EIP for an ECS?
- What Should I Do If I Fail to Access the Internet Through a Public NAT Gateway?
- Can I Change the VPC for a Public NAT Gateway?
- Does Public NAT Gateway Support IPv6 Addresses?
- What Security Policies Can I Configure to Implement Access Control If I Use a Public NAT Gateway?
- What Can I Do If Connection Between My Servers and the Internet Fails After I Add SNAT and DNAT Rules?
- Can a Public NAT Gateway Limit the Bandwidth of a Server?
- What Can I Do If the Number of Lost Packets of a Public NAT Gateway Exceeds the Threshold (or EIP Port Allocation Exceeds the Threshold)?
-
Private NAT Gateways
- How Do I Troubleshoot a Network Failure After a Private NAT Gateway Is Configured?
- How Many Private NAT Gateways Can I Buy in a VPC?
- Can I Increase the Numbers of SNAT and DNAT Rules Supported by a Private NAT Gateway?
- Can Private NAT Gateways Translate On-premises IP Addresses Connected to the Cloud Through Direct Connect?
- What Are the Differences Between Private NAT Gateways and Public NAT Gateways?
- Can a Private NAT Gateway Be Used Across Accounts?
-
SNAT Rules
- Why Do I Need SNAT?
- What Are SNAT Connections?
- What Is the Bandwidth of a Public NAT Gateway That Is Used by Servers to Access the Internet? How Do I Configure the Bandwidth?
- How Do I Resolve Packet Loss or Connection Failure Issues When Using a NAT Gateway?
- What Should I Do If My ECS Fails to Access a Server on the Public Network Through a Public NAT Gateway?
- What Are the Relationships and Differences Between the CIDR Blocks in a NAT Gateway and in an SNAT Rule?
- DNAT Rules
-
Public NAT Gateways
- Videos
- Glossary
-
More Documents
-
User Guide (ME-Abu Dhabi Region)
- Overview
- Getting Started
- Managing NAT Gateways
- Managing SNAT Rules
- Managing DNAT Rules
- Monitoring Management
-
FAQs
-
NAT Gateway
- What Is the Relationship Between VPC, NAT Gateway, EIP Bandwidth, and ECS?
- How Does A NAT Gateway Offer High Availability?
- Which Ports Cannot Be Accessed?
- What Can I Do If I Fail to Access the Internet Through the NAT Gateway?
- Can I Change the VPC for a NAT Gateway After It Is Created?
- What Is the Quota of the NAT Gateway?
-
SNAT
- Why SNAT Is Used?
- What Are SNAT Connections?
- What Is the Bandwidth of the NAT Gateway When a Server Accesses the Internet Through the NAT Gateway? Where Can I Configure the Bandwidth?
- How Do I Resolve Packet Loss or Connection Failure Issues When Using a NAT Gateway?
- What Are the Relationships and Differences Between the CIDR Blocks in a NAT Gateway and in an SNAT Rule?
- DNAT
-
NAT Gateway
- Change History
- API Reference (ME-Abu Dhabi Region)
-
User Guide (Paris Region)
- Overview
-
Getting Started
- Allowing a Private Network to Access the Internet Using SNAT
- Allowing Internet Users to Access a Service in a Private Network Using DNAT
- Allowing On-Premises Servers to Communicate with the Internet
- Using Private NAT Gateways to Enable Communications Between Cloud and On-premises Networks
- Using Multiple Public NAT Gateways Together in Performance-Demanding Scenarios
- Public NAT Gateways
- Private NAT Gateways
- Permissions Management
- Monitoring
-
FAQs
-
Public NAT Gateways
- What Is the Relationship Between a VPC, Public NAT Gateway, EIP Bandwidth, and ECS?
- How Does a Public NAT Gateway Offer High Availability?
- Which Ports Cannot Be Accessed?
- What Are the Differences Between Using a NAT Gateway and Using an EIP for an ECS?
- What Should I Do If I Fail to Access the Internet Through a NAT Gateway?
- Can I Change the VPC for a NAT Gateway?
- What Is the Quota of the NAT Gateway?
- Can I Update NAT Gateways and SNAT Rules?
- Does NAT Gateway Support IPv6 Addresses?
- What Security Policies Can I Configure to Implement Access Control If I Use a NAT Gateway?
- What Can I Do If Connection Between My Servers and the Internet Fails After I Add SNAT and DNAT Rules?
-
Private NAT Gateways
- How Do I Troubleshoot a Network Failure After a Private NAT Gateway Is Configured?
- How Many Private NAT Gateways Can I Create in a VPC?
- Can I Increase the Numbers of SNAT and DNAT Rules Supported by a Private NAT Gateway?
- Can an SNAT Rule and a DNAT Rule of a Private NAT Gateway Share the Same Transit IP Address?
- Can Private NAT Gateways Translate On-premises IP Addresses Connected to the Cloud Through Direct Connect?
- What Are the Differences Between Private NAT Gateways and Public NAT Gateways?
- Can a Private NAT Gateway Be Used Across ?
-
SNAT Rules
- Why Do I Need SNAT?
- What Are SNAT Connections?
- What Is the Bandwidth of a NAT Gateway That Is Used by Servers to Access the Internet? How Do I Configure the Bandwidth?
- How Do I Resolve Packet Loss or Connection Failure Issues When Using a NAT Gateway?
- What Should I Do If My ECS Fails to Access a Server on the Public Network Through a NAT Gateway?
- What Are the Relationships and Differences Between the CIDR Blocks in a NAT Gateway and in an SNAT Rule?
- DNAT Rules
-
Public NAT Gateways
- Change History
- API Reference (Paris Region)
-
User Guide (Kuala Lumpur Region)
- Overview
- Getting Started
- Managing NAT Gateways
- Managing SNAT Rules
- Managing DNAT Rules
- Permissions Management
- Monitoring Management
-
FAQs
- NAT Gateway
-
SNAT
- Why Is SNAT Used?
- What Are SNAT Connections?
- What Is the Bandwidth of the NAT Gateway When a Server Accesses the Internet Through the NAT Gateway? Where Can I Configure the Bandwidth?
- How Do I Resolve Packet Loss or Connection Failure Issues When Using a NAT Gateway?
- What Are the Relationships and Differences Between the CIDR Blocks in a NAT Gateway and in an SNAT Rule?
- DNAT
- Change History
- API Reference (Kuala Lumpur Region)
-
User Guide (Ankara Region)
- Service Overview
- Getting Started
- Public NAT Gateways
- Private NAT Gateways
- Permissions Management
- Monitoring
-
FAQs
- Public NAT Gateways
-
Private NAT Gateways
- How Do I Troubleshoot a Network Failure After a Private NAT Gateway Is Configured?
- How Many Private NAT Gateways Can I Create in a VPC?
- Can Private NAT Gateways Translate On-premises IP Addresses Connected to the Cloud Through Direct Connect?
- What Are the Differences Between Private NAT Gateways and Public NAT Gateways?
- Can a Private NAT Gateway Be Used Across Accounts?
- SNAT Rules
- DNAT Rules
- Change History
-
API Reference (Ankara Region)
- Before You Start
- API Overview
- Calling APIs
- APIs for Public NAT Gateways
- Private Nat API
- Permissions Policies and Supported Actions
- Common Parameters
- Change History
-
User Guide (ME-Abu Dhabi Region)
Mostrar todos
Copiado.
Cenários
Gateway NAT público
- Permitir que uma rede privada acesse a Internet usando SNAT
Se os servidores de uma VPC precisarem acessar a Internet, você poderá configurar regras de SNAT para permitir que esses servidores usem um ou mais EIPs para acessar a Internet sem expor seus endereços IP privados. Você pode configurar apenas uma regra de SNAT para cada sub-rede em uma VPC e selecionar um ou mais EIPs para cada regra de SNAT. O NAT Gateway público fornece diferentes números de conexões e você pode criar várias regras de SNAT para atender aos requisitos de serviço.
Figura 1 mostra como os servidores em uma VPC acessam a Internet usando o SNAT.
- Permitir que os usuários da Internet acessem um serviço em uma rede privada usando o DNAT
As regras do DNAT permitem que os servidores em uma VPC forneçam serviços acessíveis pela Internet.
Depois de receber solicitações de uma porta específica sobre um protocolo específico, o gateway NAT público pode encaminhar as solicitações para uma porta específica de um servidor através do mapeamento de portas. O gateway NAT público também pode encaminhar todas as solicitações destinadas a um EIP para um servidor específico por meio do mapeamento de endereços IP.
Uma regra de DNAT pode ser configurada para cada servidor. Se houver vários servidores, você poderá criar várias regras de DNAT para mapear um ou mais EIPs para os endereços IP privados desses servidores.
Figura 2 mostra como os servidores (ECSs ou BMSs) em uma VPC fornecem serviços acessíveis da Internet usando o DNAT.
- Permitir que servidores em um data center local acessem a Internet ou sejam acessíveis a partir da Internet
Em certos cenários de Internet, jogos, comércio eletrônico e financeiros, um grande número de servidores em uma nuvem privada está conectado a uma VPC por meio do Direct Connect ou VPN. Se esses servidores precisarem de acesso seguro e de alta velocidade à Internet ou precisarem fornecer serviços acessíveis pela Internet, você poderá implantar um gateway NAT e configurar regras de SNAT e de DNAT para atender aos requisitos deles.
Figura 3 mostra como usar SNAT e DNAT para fornecer acesso à Internet de alta velocidade ou fornecer serviços acessíveis a partir da Internet.
- Configurar um sistema altamente disponível adicionando vários EIPs a uma regra de SNAT
EIPs podem ser atacados. Para melhorar a confiabilidade do sistema, você pode vincular vários EIPs a uma regra de SNAT para que, se um EIP for atacado, outro EIP possa ser usado para garantir a continuidade do serviço.
Cada regra de SNAT pode ter até 20 EIPs. Se uma regra de SNAT tiver vários EIPs, o sistema selecionará aleatoriamente um EIP para os servidores usarem para acessar a Internet.
Se algum EIP for bloqueado ou atacado, remova-o manualmente do pool de EIP.
Figura 4 mostra um sistema altamente disponível usando uma regra de SNAT de um gateway NAT público.
- Usar vários gateways NAT juntos
Se um único gateway NAT não puder atender aos requisitos de desempenho, por exemplo, se houver mais de um milhão de conexões de SNAT ou se a largura de banda máxima de 20 Gbit/s não puder atender aos requisitos de serviço, você poderá usar vários gateways NAT juntos.
Para usar vários gateways NAT juntos, é necessário associar as tabelas de rotas das sub-redes VPC a esses gateways NAT públicos.
Figura 5 mostra como vários gateways NAT públicos são usados para superar o gargalo de desempenho.
- O sistema não adiciona uma rota padrão para um gateway NAT público. Você precisa adicionar uma rota apontando para o gateway NAT público à tabela de rotas correspondente.
- Cada gateway NAT público tem uma tabela de rotas associada. O número de gateways NAT públicos que podem ser criados em uma VPC é determinado pelo número de tabelas de rotas para a VPC.
Gateway NAT privado
- Conectar VPCs com blocos CIDR sobrepostos
Você pode configurar dois gateways NAT privados para duas VPCs com blocos CIDR sobrepostos, e, em seguida, adicione regras de SNAT e de DNAT nos dois gateways NAT privados para permitir que os servidores nas duas VPCs usem os endereços IP de trânsito para se comunicarem entre si.
Na figura a seguir, há duas VPCs de trânsito e dois gateways NAT privados. O endereço 192.168.0.1 na VPC A é convertido para 10.0.0.11 e o endereço IP 192.168.0.1 na VPC B é convertido para 10.0.0.22. Uma conexão de emparelhamento de VPC pode ser estabelecida entre as duas VPCs de trânsito para permitir a comunicação entre elas.
Figura 6 Conectar VPCs com blocos CIDR sobrepostos - Migração de cargas de trabalho para a nuvem sem alterar a topologia da rede ou acessar agências reguladoras a partir de endereços IP específicos
As organizações podem querer migrar suas cargas de trabalho para a nuvem sem fazer alterações na topologia de rede existente. Eles também podem ter que acessar agências reguladoras a partir de endereços IP específicos, conforme exigido por essas agências. Um gateway NAT privado é uma boa escolha.
A figura a seguir representa uma rede corporativa onde as sub-redes de diferentes departamentos se sobrepõem. Um gateway NAT privado permite que a empresa mantenha a topologia de rede existente inalterada enquanto migra suas cargas de trabalho para a nuvem. Neste exemplo, o gateway NAT privado mapeia o endereço IP de cada departamento para 10.0.0.33 para que cada departamento possa usar 10.0.0.33 para acessar com segurança a agência reguladora.
Figura 7 Migrar cargas de trabalho para a nuvem sem alterar a topologia da rede ou acessar agências reguladoras de endereços IP específicos