Free tech learning for everyone, from basics to pro

Start hereNetworking fundamentalsBasics

NAT: how many devices share one internet address

In short: NAT lets many devices with private addresses share one public IP address. The router rewrites addresses on the way out and remembers who asked for what, so replies come back to the right device.

The problem

There aren't enough public IPv4 addresses for every device in the world. So homes and offices use private addresses inside, and share a small number of public addresses to reach the internet.

NAT works like a company switchboardExtension 20laptop 192.168.1.20Switchboardrouter swapsaddressOne public numbere.g. 203.0.113.5Websitereplies to thatnumber
Figure 1. Like a receptionist who puts outside calls through one main number and remembers which extension asked, the router sends every device out through one public address and passes each reply back.

How NAT works

  1. Your laptop (192.168.1.20) asks for a website.
  2. The router swaps the private source address for its own public address and notes the connection in a table.
  3. The website replies to the public address.
  4. The router checks its table and passes the reply back to your laptop.

Most routers use PAT (port address translation, also called "NAT overload"), which uses port numbers to keep thousands of connections apart on one public address.

Port forwarding

NAT normally blocks unsolicited traffic from the internet, because the router doesn't know which inside device it's for. Port forwarding is a rule that says "send traffic arriving on port X to this inside device", for example to reach a camera recorder from outside.

Security tip: avoid forwarding ports for cameras, remote desktop or admin pages. Use a VPN instead. Exposed devices are scanned and attacked constantly.

Is NAT a firewall?

Not really. It hides inside addresses and blocks unsolicited connections as a side effect, but it doesn't inspect traffic or enforce security rules. You still need a proper firewall.

Real-world example: a whole school behind one address

A secondary school might have hundreds of pupils and staff online at once, yet the whole site may reach the internet through just one or a handful of public addresses. Inside, every laptop has a private address; at the edge, the firewall performs NAT and keeps a table of thousands of conversations, kept apart by port numbers.

This has a side effect that surprises people. To the outside world, every user in the school looks like the same visitor. If one pupil keeps entering wrong passwords on a website, that site may temporarily block the school's address, and suddenly nobody in the building can use it. The same can happen with "too many requests" messages or extra security checks on a busy café's Wi-Fi.

Try this: compare the address from ipconfig with the address shown when you search the web for "what is my IP". The first is your private extension; the second is the shared public number your router uses.

Related guide: Configuring NAT on Cisco IOS: static NAT, dynamic NAT, PAT and port forwarding

Key takeaways

  • NAT lets many private devices share one public address.
  • The router keeps a table so replies reach the right device.
  • Port forwarding opens a path in from the internet; use it carefully.
  • NAT is not a replacement for a firewall.
Tracks your learning on this device only. See your progress on the learning paths.
Verified author✓ Valid
Issued to
FM TecHub Team
Role
Editorial team
Reviewer credentials
CCNABTEC HND Network EngineeringBEng (Hons) Computer Networking & Cloud Security
Issuer
FM TecHub · fmtechub.com

The team writes practical, plain-English guides on networking, security and cloud.

More about the team →

Original content written by the FM TecHub Team. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.

Get free updates by email

New notes, tools, CCNA and Security+ tips and important security news from FM TecHub, explained simply. Free, about twice a month. Unsubscribe anytime; see our privacy policy.

PortServiceStatus
SMTP/25Email updatesup

Free · no spam · past emails · powered by Buttondown