Networking · 6 min read · 30 November 2026
What Is NAT? Network Address Translation and Port Forwarding Explained
NAT lets many devices with private IP addresses share one public address. How NAT and port forwarding work, private ranges, CGNAT, and NAT's security limits.
NAT (Network Address Translation) lets many devices on a private network share one public IP address. The gateway rewrites the source address of outgoing traffic and keeps a table so replies reach the right device. It is why an office with hundreds of devices can use a single internet address.
Private IP address ranges
Inside the network, devices use private addresses that are not routed on the internet (RFC 1918):
| Range | CIDR | Typical use |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | Large and multi-site networks |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | Medium networks, labs, containers |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | Homes and small offices |
See subnet masks and CIDR for how to divide these ranges.
How NAT works
- A laptop at 192.168.10.25 opens a website.
- The gateway replaces the source with its public address and a free port number, and records the mapping.
- The website replies to the public address and port.
- The gateway looks up the mapping and forwards the reply to 192.168.10.25.
This many-to-one form is called PAT or NAT overload. It works automatically for outgoing connections.
Port forwarding: reaching a device from outside
Incoming connections have no mapping, so they are dropped unless you create a port forward (destination NAT) that sends, for example, a given port to an internal server. Every port forward exposes that device to the internet. For cameras, recorders and admin pages, use a VPN instead; see secure remote access to CCTV.
CGNAT and IPv6
- CGNAT: some providers, especially on 4G/5G, put customers behind their own NAT using the 100.64.0.0/10 range. Port forwarding then cannot work; a VPN that the site connects out to, or a public IP from the provider, is needed.
- IPv6: with enough addresses for every device, IPv6 normally does not use NAT; the firewall decides what may enter. See IPv6 for business.
NAT is not a firewall
NAT hides internal addresses and drops unsolicited traffic as a side effect, but it does not inspect traffic, block malware or control what users reach. Use a real firewall policy on the gateway.
FAQ
Frequently asked questions
Why do we need NAT?
Public IPv4 addresses are scarce. NAT lets a whole network of devices with private addresses share one or a few public addresses.
Is NAT a security feature?
Only partly. It blocks unsolicited incoming connections as a side effect, but it is not a firewall: it does not inspect traffic or control outgoing access.
What is the difference between NAT and port forwarding?
NAT translates outgoing traffic automatically. Port forwarding is a manual rule that lets specific incoming traffic reach an internal device.
Why does port forwarding not work on my 4G connection?
Many mobile providers use carrier-grade NAT (CGNAT), so your gateway has no public address. Use a VPN the site connects out to, or ask the provider for a public IP.
Related
Keep reading
The three measures of network quality explained simply: what latency, jitter and packet loss are, typical good values for voice, video and gaming, causes and how to measure them.
Read more →What Is a MAC Address? How It Differs From an IP AddressMAC addresses explained: what they are, how switches use them, how they differ from IP addresses, MAC randomisation on phones, and why it matters for Wi-Fi and security.
Read more →What Is DHCP and How Does It Work? A Simple GuideDHCP explained simply: how devices get IP addresses automatically (Discover, Offer, Request, Acknowledge), leases, scopes, reservations, options, relay and security.
Read more →AI-Powered Networking: How Intelligent Automation is Reshaping IT InfrastructureRead more →Need help designing your network?
Navijin engineers provide free design consultations, bills of materials and quotations for business projects.