Network Address Translation (NAT) is a method of mapping an IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device. NAT enables private IP networks to use the internet and cloud by translating private IP addresses in an internal network to a public IP address before packets are sent to an external network. NAT is often implemented at the WAN edge router to enable internet access in core, campus, branch, and colocation sites.
NAT allows multiple devices to access the internet through a single public IP address by translating a private IP address to a public IP address. It also translates port numbers, masking the port number of the host with another port number in the packet that will be routed to the destination. NAT generally operates on a router or firewall.
NAT is used to conserve the number of public IP addresses in use, for both security and economic goals. It helps to improve security and decrease the number of IP addresses an organization needs. By default, outside public IPs cannot communicate to an internal network, which helps ensure security.