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):

RangeCIDRTypical use
10.0.0.0 – 10.255.255.25510.0.0.0/8Large and multi-site networks
172.16.0.0 – 172.31.255.255172.16.0.0/12Medium networks, labs, containers
192.168.0.0 – 192.168.255.255192.168.0.0/16Homes and small offices

See subnet masks and CIDR for how to divide these ranges.

How NAT works

  1. A laptop at 192.168.10.25 opens a website.
  2. The gateway replaces the source with its public address and a free port number, and records the mapping.
  3. The website replies to the public address and port.
  4. 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.

Need help designing your network?

Navijin engineers provide free design consultations, bills of materials and quotations for business projects.