Technology Encyclopedia Home >How do instances (cloud servers, databases) without public IP addresses access the public network?

How do instances (cloud servers, databases) without public IP addresses access the public network?

Instances without public IP addresses can access the public network through a process called Network Address Translation (NAT). NAT allows private IP addresses within a network to communicate with devices on the public internet by translating these private IPs into a public IP address.

Explanation:

  • Private IP Addresses: These are used internally within a network and are not routable on the internet. They typically fall within specific ranges defined by RFC 1918.
  • NAT: This service translates private IP addresses to a public IP address, allowing internal devices to access the internet. It can be implemented in various ways, such as NAT Gateway or NAT Instance in cloud environments.

Example:
Imagine a company with several servers in a private network (e.g., 192.168.1.x). These servers need to access the internet to download updates or communicate with external services. A NAT Gateway is set up in the cloud environment (like Tencent Cloud's NAT Gateway service), which has a public IP address. When the internal servers send traffic to the internet, the NAT Gateway translates their private IP addresses into its own public IP address. The response from the internet is then translated back to the appropriate private IP address before being delivered to the original server.

Tencent Cloud Service Recommendation:
For scenarios requiring NAT functionality, Tencent Cloud offers the NAT Gateway service. It provides high availability, supports large-scale concurrent connections, and integrates with other Tencent Cloud services for seamless networking solutions.