How NAT Helps Devices Access the Internet

Опубликовано: 17 Май 2026
на канале: Netsechub Animated Videos
258
3

Have you ever wondered how your private IP like 192.168.1.2 is able to access Google on the internet… even though it’s NOT globally reachable?
That magic is called NAT — and in the next 2 minutes, you’ll fully understand it.
NAT stands for Network Address translation.
network address translation means changing from one IP address to other IP address in basic terms. Now before going to actual NAT process lets try to understand what is
public and private IP address in detail.
There are two type of IP address:
public IP and private IP.
Publc IP means, they are recognized by ISP.
Private IP means, they are unrecognized by ISP.
Private IP ranges:
10.0.0.0 – 10.255.255.255 (10.0.0.0/8) - Class A
172.16.0.0 – 172.31.255.255 (172.16.0.0/12) - Class B
192.168.0.0 – 192.168.255.255 (192.168.0.0/16) - Class C

To be more precise,
consider there is user machine in corporate network and trying to access www.google.com
User(192.168.1.2) ----------------Router----------------Internet
If there is no concept of NAT and if we trace connection in user machine using wireshark, you will see something
like below:
source:192.168.1.2 Destination:147.25.2.3 source port: Random port (1024-65535) and destination port:443
Then if router forwards same packet to next ISP router, ISP usually do filtering of these private IP address range. Consider if
ISP router does not do filtering, then if the connection reach end server, so server has to do find out how to
reach this source IP 192.168.1.2, by default ISP do not have route information for private IP range so it will eventually
drop the connection.

So in order to solve this issue, NAT feature came into picture.
User (192.168.1.2) -------------Router (public IP-184.23.12.42) ----------------------------Internet server(147.25.2.3)
Consider user accessing www.google.com server.
With NAT flow would be like below:
source:192.168.1.2 Destination:147.25.2.3 source port: Random port (34543) and destination port:443
This packet, by the time it reach router IN interface (means interface connected to the user machine) it looks like below:
User (192.168.1.2) -------------Router (public IP-184.23.12.42) ----------------------------Internet server(147.25.2.3)
But if we take capture in router OUT interface, packet looks like below:
Source (184.23.12.42) -------------Destination server(147.25.2.3) source port: different random port(45344) and destination port:443
This router has NAT entry created similar to one like below:
Protocol: TCP/UDP
Inside local: 192.168.1.2:34543
Inside global: 184.23.12.42:45344
Outside global: 147.25.2.3:443

So this packet reaches next ISP router, this router is aware of source public IP so it does not do filtering,
this packet reach the end server. The end server has route to reach the user public IP "184.23.12.42", so response
packet forwards to user router. By the time it reach router, packet would like below:
source:147.25.2.3 destination: 184.23.12.42, source port:443 and destination port:45344
Then it will check NAT entry, for the destination IP address "184.23.12.42 and port 45344", and based on previously
created NAT entry it will forward connection to "192.168.1.2 and port 34543"

Here if we observe along with IP address, ports also changing. This is called port address translation.
You can reach us through telegram and instagram links added in description for interview guidance and mock interview scheduling.
Happy Learning!

Instagram link:
https://www.instagram.com/inside_thei...
Telegram link:
https://t.me/firewallgeeks
#networking #networkaddresstranslation #portaddresstranslation #cybersecuirty #networksecurity #ccna #cybersecurity #computernetworks #cybersecuritytraining #networkingcourse #networkcourse