Networking › Module 2 › Lesson 4
Public vs Private IP
RFC1918 private ranges, NAT, and how home and enterprise networks reach the internet
Opening
Your home IP is not what the internet sees
Check your phone on Wi-Fi—it probably shows 192.168.x.x. That is a private address, invisible to the wider internet. Your router translates it to a single public IP using NAT. Attackers and defenders both need to understand this split: internal reconnaissance vs external footprint are two different worlds.
1. Private IP Ranges (RFC 1918)
These ranges are reserved for internal use and are not routable on the public internet:
10.0.0.0 – 10.255.255.255
10.0.0.0/8 — Large enterprises and cloud VPCs often use this range.
172.16.0.0 – 172.31.255.255
172.16.0.0/12 — Medium-sized internal networks.
192.168.0.0 – 192.168.255.255
192.168.0.0/16 — Home routers, small offices, and lab VMs almost always use this.
2. Public IP Addresses
A public IP is globally routable on the internet. Your ISP assigns one to your home router (or you pay for a static one for a server). Websites, mail servers, and VPN endpoints need public IPs so the world can reach them. Security note: exposing a service on a public IP without a firewall is asking for scans. Shodan and Censys index public-facing systems daily.
3. NAT — Network Address Translation
NAT lets many private devices share one public IP. When your laptop (192.168.1.50) visits google.com, the router: 1. Replaces the source IP with its public IP 2. Tracks the connection in a translation table 3. Routes return traffic back to the correct internal device From the outside, your entire household looks like one IP. That is why port forwarding exists—to punch specific holes for game servers or cameras.
4. Security Angles
Defense in depth
Private IPs are not directly reachable from the internet—a natural barrier, but not a substitute for firewalls.
Lateral movement
Once inside a network, attackers map internal private ranges (10.x, 192.168.x) to find more targets.
OSINT and attribution
A public IP in a log might trace to an ISP or VPN exit node—not the attacker's real identity.
Find your public IP safely
Visit a trusted site like ifconfig.me or run: curl ifconfig.me Never paste your public IP into random "what is my IP" sites that ask you to install software.
Knowledge Check
Which of these is a private IP address?
Multiple choice
Knowledge Check
What does NAT allow?
Multiple choice
Knowledge Check
True or False: 10.0.0.0/8 is an RFC 1918 private address range.
True or False