What is an IP address? Public vs private IP

☰ All 15 lessons

If your teacher wants to tell only you something in class, what's the first thing they do? They call your name.

An IP address is a device's name on the network

Imagine I'm sitting in class. If the teacher wants to talk to me directly, they first call "Manu", and only then start talking. Networks work the same way. A network can have thousands, sometimes crores of computers. To send a message to just one of them, you need a way to call it. That's the IP address: the device's name, its address on the network.

Private IPs inside the home, one public IP on the internet🏠 Home network (private)📱 192.168.1.2💻 192.168.1.3Router192.168.1.1203.0.113.25🌍 Internetsees only the public IP
  1. Inside your home, every device gets a private IP like 192.168.1.2.
  2. The router connects them and keeps the private IPs inside.
  3. To the internet, your whole home appears as one public IP from your ISP.
Devices at home use private IPs; the internet only sees your modem's public IP.

Private IP: valid only inside

Check your phone's IP on your home Wi-Fi and you'll see something like 192.168.1.5 or 192.168.31.2. That's a private IP. The router in your home box creates these for the devices in your house. They're valid only inside your network, and someone outside can't use them to reach you.

Private IPs come from three reserved ranges: 10.x.x.x, 172.16.x.x to 172.31.x.x, and 192.168.x.x. Millions of homes use the same 192.168 numbers, and that's fine, because they never leave the house.

Public IP: your address on the internet

A private IP won't work on the internet. For that you need a public IP. Your modem is what actually connects to the internet, so your internet provider (the ISP) gives the modem a public IP, something like 203.0.113.25. Every device in your home goes out to the internet through that one public IP.

Private IPPublic IP
Where it worksOnly inside your home or officeOn the internet
Who gives itYour routerYour internet provider (ISP)
Example192.168.1.5203.0.113.25
Unique?No, reused in millions of homesYes, unique on the internet

Try it: private or public IP?

Type any IPv4 address, for example 192.168.31.2, 10.0.0.5 or 8.8.8.8.

Why it matters for hackers: when you scan or read logs, the first question is whether an IP is inside the network or out on the internet. A private IP in a log means the traffic came from inside; a public one means it came from outside. (The public IPs in these lessons, like 203.0.113.25, come from a range reserved for examples, so they belong to nobody. Don't post your own real public IP online.)

Key takeaways

  • An IP address identifies one device on a network.
  • Private IP (192.168.x.x, 10.x.x.x, 172.16–31.x.x) works only inside your network.
  • Public IP is given by your ISP and is how you appear on the internet.
  • Private inside the house, public on the internet.

Quick quiz

Pick an answer to check yourself. Answer both to mark this lesson done.

1. What is used to call one particular computer on a network to send it a message?

  1. A) IP address
  2. B) Wi-Fi password
  3. C) The computer's brand name
  4. D) The browser's name
Show answer

Answer: A. Like a teacher calling your name, the IP address is used to find a device on the network and send it a message.

2. Which of these is a private IP?

  1. A) 203.0.113.25
  2. B) 192.168.1.5
  3. C) 8.8.8.8
  4. D) 198.51.100.7
Show answer

Answer: B. IPs starting with 192.168 are private IPs used only inside a home or office network. The others are public.

Frequently asked questions

What is the difference between public and private IP?

A private IP is used only inside a home or office network and is given by your router. A public IP is given by your internet provider and is how your network appears on the internet.

Is 192.168.1.1 a public IP?

No. Every address starting with 192.168 is private, valid only inside a local network. 192.168.1.1 is often the router's own address.

How do I find my IP address?

On Android, open Settings, search "IP" and open IP address. That shows your private IP on the current Wi-Fi. Your public IP is shown by any "what is my IP" site.

Do it hands-on.

This tutorial gives you the concepts. The 50 Days Ethical Hacking Challenge puts them to work in real labs, explained in Malayalam.