What Is NAT? Network Address Translation Explained

IP Address & Networking6 min read
Illustration of several devices connected through a single router to the internet

The average household now has a dozen or more connected devices, yet its internet provider typically assigns just one public IPv4 address. Network Address Translation, or NAT, is the technology that makes this work. It sits quietly inside nearly every home router, and most people never think about it until a game reports a "strict NAT type" or a camera cannot be reached from outside. This guide explains how NAT works, where it helps and where it gets in the way.

Why NAT exists

IPv4 has only about 4.3 billion addresses, and they were used up long before every device was online. NAT was standardized in the 1990s as a stopgap that allowed an entire organization to sit behind one public address, with its own devices using private addresses such as 192.168.1.x. It worked so well that it became permanent, and it is a main reason the IPv4 internet kept growing for decades after the free address pool ran dry.

How NAT works step by step

Imagine your laptop at 192.168.1.23 opens a connection to a web server at 203.0.113.10 on port 443. The process looks like this:

  1. The laptop sends a packet with source 192.168.1.23:51514 and destination 203.0.113.10:443 to the router.
  2. The router rewrites the source to its own public address and a free port, for example 198.51.100.7:40001, and records the mapping in a translation table.
  3. The server replies to 198.51.100.7:40001.
  4. The router looks up port 40001 in its table, rewrites the destination back to 192.168.1.23:51514 and delivers the packet.

Because the mapping includes port numbers, thousands of simultaneous connections can share one address. This variant is formally called NAPT or PAT (port address translation), but most people simply say NAT.

Types of NAT

  • Static NAT maps one private address permanently to one public address. It is used in business networks to publish a server.
  • Dynamic NAT picks a public address from a pool when a device needs one.
  • PAT (overload) maps many private addresses to a single public address using ports. This is what home routers do.

Gamers also hear "Open", "Moderate" and "Strict" NAT types. These are console labels describing how easily other players can connect to you. Open means incoming connections generally succeed, while Strict means the router blocks most of them.

Port forwarding and its risks

NAT drops unexpected inbound connections because the router has no mapping for them. If you want to run a web server, a game server or remote access to a camera, you create a port forwarding rule that says "send incoming traffic on port 25565 to 192.168.1.50". This is useful, but every forwarded port is a door into your network. Forward only what you need, keep the target device updated and use strong passwords. Our guide to firewalls explains additional protection.

Carrier-grade NAT

When a provider runs out of public IPv4 addresses, it can apply NAT at its own level, called carrier-grade NAT (CGNAT). Many customers then share one public address, and your router receives an address from the 100.64.0.0/10 range reserved for this. Browsing still works, but you cannot forward ports, and IP-based features, such as location detection or blocking, may treat you and your neighbors alike. Details on how providers hand out addresses are in How Does Your ISP Assign IP Addresses?

NAT, security and privacy

NAT is often described as a security feature. It is a helpful side effect, since unsolicited inbound traffic is dropped, but it is not designed as a security mechanism and does not replace a firewall. On the privacy side, NAT hides your internal device addresses from the outside world, yet all your devices share one public address that websites can still log and combine with cookies, as explained in How Websites Track Visitors.

NAT and IPv6

IPv6 has enough addresses for every device to have its own, so NAT is generally unnecessary. Connectivity is again end-to-end, and a stateful firewall in the router provides the protection that people had come to associate with NAT. You can read about the transition in IPv4 vs IPv6.

Conclusion

NAT lets many devices share a single public IPv4 address by rewriting addresses and ports in a translation table. It saved the internet from running out of addresses, blocks most unsolicited incoming traffic and is invisible to most users. Its downsides appear when you need incoming connections, in which case port forwarding, a public address or IPv6 can help.

Frequently asked questions

Does NAT slow down my internet?

Not in any noticeable way. Modern routers translate addresses in hardware at full line speed.

How can I tell whether I am behind CGNAT?

Compare the WAN address in your router's status page with the public address on our IP lookup. If they differ, or the WAN address starts with 100.64 to 100.127, your provider is probably using CGNAT.