About this interactive
Most internal networks use private addresses, the RFC 1918 ranges set aside in 1996 to stretch the supply of IPv4. Millions of networks use the same private ranges, so those addresses cannot be routed on the internet. Network address translation swaps them for a public one on the way out.
What most people call NAT is really port address translation (PAT): the whole network shares one public address. When 192.168.0.26 opens a connection to a web server, the gateway records the inside address and port, gives the conversation a port on the public address, and rewrites the packet's source. When the reply comes back to that public port, the gateway looks it up, rewrites the destination to 192.168.0.26 and the original port, and sends it in. Two PCs using the same inside port still get different public ports, which is how the replies stay apart.
The security side follows from the table. A host on the internet that tries to reach in finds no entry for its packet, so the gateway has nowhere to send it. Traffic can go out and its replies come back, and little else gets in: NAT behaves much like a stateful firewall. A NAT gateway is whatever device does this job, often a firewall dedicated to it.
About TechKnowSurge
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →