What Is NAT (Network Address Translation)?
NAT (Network Address Translation) is a networking technique that rewrites the source or destination IP address in packets as they cross a router, most commonly to let many devices on a private network share a single public IP address. It is why an entire home or office can access the internet through one IP address from the provider.
How NAT works
Every device on a private network gets a private IP address, such as those in the 192.168.0.0/16 or 10.0.0.0/8 ranges, which cannot be reached directly from the internet. When one of those devices sends traffic out, the router performs NAT: it swaps the device's private source address for its own public address, and keeps a table mapping each active connection to the original device and port. When a reply comes back, the router looks up the table and forwards the traffic to the correct internal device.
Types of NAT
| Type | What it does |
|---|---|
| Static NAT | Maps one private address to one fixed public address, used for servers that must always be reachable the same way |
| Dynamic NAT | Maps private addresses to one of several available public addresses from a pool |
| PAT / NAT overload | Maps many private addresses to a single public address using different port numbers, the kind used by most home and office routers |
Why NAT matters
- IPv4 conservation: NAT let the internet keep growing for years despite a limited supply of IPv4 addresses, since one public address can serve many devices.
- A basic privacy layer: devices behind NAT are not directly addressable from the internet, which is incidental but useful as a first line of defense; it is not a substitute for a firewall.
- Complications for inbound connections: because NAT only tracks connections initiated from inside, an unsolicited inbound connection has nowhere to go unless the router is told where to send it.
NAT and hosting: port forwarding
If you run a service behind a NAT router and want it reachable from the internet, for example a game server or a self-hosted app on a home network, you need port forwarding: a rule on the router that says traffic arriving on a given public port should always be sent to a specific private IP address and port. Dedicated hosting servers and VPS instances in a data center usually have a public IP address assigned directly, which is why they do not need NAT or port forwarding to be reachable from the internet.
# Example of a NAT/port-forward rule on a router
# Public: any external IP, port 8080
# Forward to: 192.168.1.50, port 80
NAT and IPv6
IPv6 provides enough addresses that every device can have its own public, globally routable address, so large-scale NAT is not strictly necessary the way it is with IPv4. Most networks still run IPv4 alongside IPv6 today (dual-stack), so NAT remains common in practice even as IPv6 adoption grows.
Frequently asked questions
What does NAT stand for?
NAT stands for Network Address Translation. It is the process of rewriting IP addresses in network traffic, typically so multiple private devices can share one public IP address.
Why do home routers use NAT?
Internet providers usually assign only one public IP address per household, so the home router uses NAT to let every connected device, from phones to laptops to smart TVs, share that single address when reaching the internet.
Does my hosting server need NAT?
Usually not. Dedicated servers and most VPS instances get a public IP address assigned directly from the provider, so traffic reaches them without any address translation. NAT mainly matters for devices on private networks, like a home office or internal company network.
What is port forwarding and how does it relate to NAT?
Port forwarding is a rule that tells a NAT router to send incoming traffic on a specific port to a specific device on the private network. It is needed because NAT normally only allows outbound-initiated connections to receive replies, not unsolicited inbound traffic.
Does NAT make a network more secure?
NAT provides a mild side benefit because devices behind it are not directly reachable from the internet, but it is not a real firewall and should not be relied on for security. A proper firewall with explicit rules is still needed.
Will IPv6 eliminate the need for NAT?
IPv6 has enough addresses that every device can have its own public address without NAT, but most networks today run IPv4 and IPv6 together, so NAT is still widely used for the IPv4 side of that traffic.
Related topics
- What Is an IP Address? Networking & IP
- IPv4 vs. IPv6 Networking & IP
- What Is a Firewall? Security & SSL
- What Is a VPS (Virtual Private Server)? VPS & Cloud
- What Is a Data Center? Hosting Basics