Skip to content
Buy me a coffee

Public and private addresses

tag: networkingtag: beginners

Three ranges are set aside for private networks (RFC 1918). Anyone can use them, so millions of homes and offices reuse the same numbers, and they’re never routed on the internet.

Range Written as Addresses
10.0.0.0 – 10.255.255.255 10.0.0.0/8 16,777,216
172.16.0.0 – 172.31.255.255 172.16.0.0/12 1,048,576
192.168.0.0 – 192.168.255.255 192.168.0.0/16 65,536

Home routers usually hand out addresses like 192.168.1.20. (The /8, /12 and /16 are CIDR, the next page.)

Your router has one public address, unique on the internet. It speaks for every device behind it, using NAT (network address translation): it swaps each device’s private address for its own on the way out, and remembers who asked for what so replies come back to the right device.

  1. Find your private address with ipconfig or ipconfig getifaddr en0 (see IP addresses).
  2. Search the web for “what is my IP”. That site sees your public address.

They won’t match, and that’s NAT at work.

Range What it means
127.0.0.0/8 Loopback, this machine (127.0.0.1 and localhost)
169.254.0.0/16 Link-local: a device that asked for an address and got no answer
100.64.0.0/10 Carrier-grade NAT: your internet provider sharing public addresses between customers
0.0.0.0 “Nowhere” or “every interface”, depending on where you see it
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 Reserved for documentation and examples, like the ones on this site
  • Inside or outside? A private source address in an alert is a machine inside the network. A public one came from the internet.
  • Private isn’t an IOC. A private address in a public report is meaningless outside the victim’s network. Don’t hunt for it in yours.
  • A private “C2” is a clue. If malware is configured to call a private address, it may be talking to another infected machine inside the network, or it’s leftover test config.

CIDR and subnets: what the slash and the number after an address mean.

One Reverse Look

"A little learning is a dangerous thing." ~ A. Pope

One Reverse Look · Made with ❤ · Your friendly knowledge seeker