Public vs. Private IP Addresses: What’s the Difference?

Understand the two types of IP addresses every network uses, how NAT bridges them, and why the distinction matters for security, troubleshooting, and network design.

TL;DR — Key Takeaways

  • Your public IP address is assigned by your ISP and is visible to every server you connect to on the internet — it is your network’s identity online.
  • Private IP addresses come from three reserved RFC 1918 ranges: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. They are used only inside local networks.
  • NAT (Network Address Translation) is the mechanism that connects private and public addresses, allowing many devices to share a single public IP.
  • You can find your public IP with a lookup tool or curl, and your private IP with ipconfig (Windows) or ifconfig (macOS/Linux).
  • Understanding the distinction matters for security, network design, IPv4 conservation, and troubleshooting.

Introduction

Every device that communicates over a network needs an IP address, but not all IP addresses serve the same purpose. Some addresses are meant to identify you on the global internet, while others exist only within the boundaries of your home or office network. The difference between these two types — public and private IP addresses — is one of the most fundamental concepts in networking.

If you have ever wondered why your router has one address and your laptop has a different one, or why every device in your house seems to share the same IP when visiting a website, the answer lies in this public-versus-private distinction and the translation layer that connects them. When network issues arise, understanding which address is involved is often the first step in a systematic troubleshooting approach.

What Is a Public IP Address?

A public IP address is a globally unique address assigned to your network by your Internet Service Provider (ISP). It is the address that identifies your network on the internet. When you visit a website, send an email, or stream a video, the remote server sees your public IP address as the source of the request.

Public IP addresses have several defining characteristics:

  • Globally unique — No two devices on the public internet can share the same public IP address at the same time. Regional Internet Registries (RIRs) like ARIN, RIPE, and APNIC manage allocation to ensure uniqueness.
  • Internet-routable — Routers across the internet know how to forward traffic to and from public IP addresses. They appear in global routing tables maintained by ISPs and backbone providers.
  • Visible to remote servers — Every website, API, and online service you connect to can see your public IP address in the packet headers.
  • Assigned by your ISP — You do not choose your public IP. Your ISP either assigns one dynamically each time your router connects (dynamic IP) or provides a fixed one under a business or premium plan (static IP).

Most residential connections use dynamic public IPs, which may change periodically when your router reconnects. Businesses that host servers, run VPNs, or need consistent DNS records typically pay for static public IPs that remain the same indefinitely.

How to Find Your Public IP

The quickest way to find your public IP address is to use a dedicated lookup tool. NetworkCheckr’s My IP Address tool shows your public IP instantly. For a detailed walkthrough of multiple methods, see our guide on how to find your public IP address.

From the command line, you can also query a public service:

curl ifconfig.me

This returns your public IP because the remote server (ifconfig.me) sees the source address of your request — which, after NAT, is your router’s public IP. Keep in mind that your public IP is the address exposed to the internet, which is why protecting it with a firewall is important.

What Is a Private IP Address?

A private IP address is an address reserved for use within local networks. These addresses are defined in RFC 1918 and are not routable on the public internet. Any router on the internet that encounters a packet with a private source or destination address will drop it.

Private addresses exist because there are not enough IPv4 addresses (roughly 4.3 billion) for every device in the world to have its own public IP. By letting organizations reuse the same private ranges internally, RFC 1918 massively extends the effective address space. Your home network can use 192.168.1.0/24, and so can your neighbor’s — there is no conflict because these addresses never appear on the public internet.

The Three Private IP Ranges

CIDR Range Address Range Subnet Mask Approx. Addresses Typical Use
10.0.0.0/8 10.0.0.0 – 10.255.255.255 255.0.0.0 ~16.7 million Large enterprises, cloud VPCs
172.16.0.0/12 172.16.0.0 – 172.31.255.255 255.240.0.0 ~1 million Medium businesses, container networks
192.168.0.0/16 192.168.0.0 – 192.168.255.255 255.255.0.0 ~65,000 Home networks, small offices

If you need to plan subnets within these ranges, our Subnet Calculator can help you divide them into appropriately sized blocks. And while private addressing is an IPv4 concept rooted in address scarcity, the picture changes significantly with IPv6, which provides enough addresses to give every device a globally unique one.

How NAT Connects Public and Private Addresses

Network Address Translation (NAT) is the mechanism that bridges the gap between private and public IP addresses. Defined in RFC 3022, NAT allows devices with private addresses to communicate with the public internet by translating their private source addresses to a public address at the network boundary — typically your router.

Here is how a basic NAT flow works:

  1. Your laptop (private IP 192.168.1.10) sends a request to a web server at 93.184.216.34.
  2. The packet reaches your router, which replaces the private source address with the router’s public IP (e.g., 203.0.113.45) and assigns a unique source port number.
  3. The web server receives the packet from 203.0.113.45 and sends its response back to that address.
  4. Your router receives the response, looks up the port mapping in its NAT table, and forwards the packet to 192.168.1.10.

PAT: Port Address Translation

In practice, most home and small business routers use PAT (Port Address Translation), also called NAT overload. PAT allows multiple devices to share a single public IP by assigning each session a unique source port number. The router maintains a translation table that maps each internal device and port to a unique external port:

Internal (Private) External (Public) Destination
192.168.1.10:51234 203.0.113.45:40010 93.184.216.34:443
192.168.1.22:49876 203.0.113.45:40011 93.184.216.34:443
192.168.1.35:50512 203.0.113.45:40012 142.250.80.46:443

Each row represents a different device on the local network, all sharing the single public IP 203.0.113.45. The router uses the unique external port number to route responses back to the correct internal device. For a deeper look at how port numbers work in networking, see our Port Number Reference.

Public vs Private IP Address: Side-by-Side Comparison

The following table summarizes the key differences between public and private IP addresses:

Characteristic Public IP Address Private IP Address
Assignment Assigned by ISP from RIR-allocated blocks Assigned by router/DHCP server on local network
Scope Global — reachable across the entire internet Local — valid only within the LAN
Uniqueness Globally unique; no duplicates on the internet Reused across millions of independent networks
Routability Routable on the public internet Not routable; dropped by internet routers
Visibility Visible to every server and service you connect to Visible only to devices on the same local network
Examples 8.8.8.8, 203.0.113.45, 104.26.10.78 192.168.1.10, 10.0.0.5, 172.16.0.100
Managed by IANA → RIRs → ISPs Local network administrator or router

How to Find Your Public and Private IP

Knowing how to find both your public and private IP addresses is a practical skill for troubleshooting, configuration, and security checks.

Finding Your Public IP

  • Web tool — Visit NetworkCheckr’s My IP Address tool for an instant result.
  • Command line — Run curl ifconfig.me or curl icanhazip.com in your terminal.
  • Router admin panel — Log in to your router (commonly at 192.168.1.1) and look for the WAN or Internet status page, which shows the public IP assigned by your ISP.

Finding Your Private IP

Windows:

ipconfig

Look for the IPv4 Address line under your active network adapter. It will show an address like 192.168.1.10 or 10.0.0.5.

macOS / Linux:

ifconfig

Find the inet entry under your active interface (usually en0 on macOS or eth0/wlan0 on Linux). On newer Linux distributions, you can also use ip addr show.

If you want to see how your IP address looks in binary notation, try our IP to Binary Converter — it breaks down each octet into its 8-bit representation.

Why the Public vs Private IP Address Distinction Matters

The division between public and private addresses is not just academic. It has real implications across four key areas of networking.

Security

Your public IP is exposed to the internet and can be scanned by anyone. Attackers routinely sweep public IP ranges looking for open ports and vulnerable services. A properly configured firewall is your first line of defense, controlling which inbound connections are permitted and blocking everything else. Private IP addresses, on the other hand, are shielded from direct internet access by the NAT boundary — but that does not mean they are inherently safe from internal threats.

Network Design

Designing a network requires careful planning of private address space. Choosing the right RFC 1918 range, dividing it into subnets, and assigning addresses systematically prevents conflicts and makes the network easier to manage as it grows. Understanding where private addressing sits within the broader OSI model (Layer 3, the Network layer) helps clarify how routing and addressing decisions interact with other layers of the stack.

IPv4 Conservation

The entire reason private addressing and NAT exist is IPv4 address exhaustion. With only about 4.3 billion public IPv4 addresses available and billions of connected devices worldwide, there simply are not enough public addresses to go around. Private addressing combined with NAT allows thousands of devices to share a single public IP. The long-term solution is IPv6, which provides a virtually unlimited address supply, but the transition is gradual and IPv4 remains dominant.

Troubleshooting

When diagnosing connectivity problems, knowing whether the issue involves your public IP or your private IP narrows the problem significantly. If a DNS lookup fails, is it because the DNS server cannot reach your public IP, or because your device’s private IP is misconfigured? If a reverse DNS lookup on your public IP returns unexpected results, the problem lies with your ISP or DNS provider, not your local network. Understanding which address is relevant at each stage saves time and prevents misdiagnosis.

Common Misconceptions

“My Private IP Is Secret”

Many people assume that because a private IP address is not routable on the internet, it must be confidential. In reality, knowing that someone’s device is at 192.168.1.10 tells you almost nothing useful, because millions of networks use that exact same address. Private IPs are not secret — they are simply not unique. The security benefit of private addressing comes from non-routability, not obscurity.

“NAT Is a Firewall”

NAT does provide a side effect of blocking unsolicited inbound connections, because the router has no NAT table entry to know where to forward them. However, NAT was designed for address translation, not security. It does not inspect packet contents, does not filter by protocol or application, and does not log suspicious activity. A proper firewall provides intentional, configurable, auditable security — NAT does not. Relying on NAT as your only protection leaves significant gaps.

“Every Device Has Its Own Public IP”

This is one of the most common misunderstandings. In a typical home network, your ISP assigns one public IP address to your router. Every device on your network — phone, laptop, smart TV, game console — shares that single public IP through NAT. Each device has its own private IP within the local network, but to the outside world, they all appear as the same address.

Frequently Asked Questions

What is a 192.168 IP address?

An address starting with 192.168 belongs to the private IP range 192.168.0.0/16, defined in RFC 1918. It is the most common private range used by home routers. When your router assigns your phone an address like 192.168.1.15, that address works only within your local network. It cannot be reached from the internet, and millions of other networks use the exact same range simultaneously.

Can someone hack me using my public IP address?

Knowing your public IP address alone is not enough to hack you, but it is a starting point. An attacker could scan your public IP for open ports and attempt to exploit vulnerable services. This is why you should keep your router firmware updated, disable remote management features you do not use, use strong passwords, and run a firewall. A public IP is not a vulnerability in itself — exposed, unpatched services behind it are.

How many private IP addresses are available?

The three RFC 1918 ranges provide approximately 17.9 million private addresses in total: about 16.7 million in the 10.0.0.0/8 block, roughly 1 million in 172.16.0.0/12, and about 65,000 in 192.168.0.0/16. Since these ranges can be reused by every network independently, the effective supply is unlimited.

Does a VPN change my public or private IP address?

A VPN changes your apparent public IP address. When you connect to a VPN, your traffic is encrypted and routed through the VPN provider’s server. Websites and services see the VPN server’s public IP instead of your ISP-assigned public IP. Your private IP address on your local network stays the same — only the public-facing identity changes.

Why do all my devices share the same public IP address?

Because of NAT. Your router has one public IP address assigned by your ISP. Every device on your home network sends its traffic through the router. NAT translates each device’s private IP to the router’s public IP before the traffic leaves your network. The router uses different port numbers to keep track of which responses belong to which device. This is why a single household can have dozens of connected devices but only one public IP.

What happens when we run out of public IPv4 addresses?

We essentially already have. IANA allocated its last blocks of IPv4 addresses to regional registries in 2011, and most regions have since exhausted their free pools. The short-term workarounds include NAT, CGNAT (Carrier-Grade NAT, where your ISP applies NAT at scale), and an active market for buying and selling unused IPv4 blocks. The long-term solution is IPv6, which provides approximately 340 undecillion addresses — enough for every grain of sand on Earth to have trillions of addresses.

References

  • RFC 1918 — Address Allocation for Private Internets — datatracker.ietf.org/doc/html/rfc1918
  • RFC 3022 — Traditional IP Network Address Translator (Traditional NAT) — datatracker.ietf.org/doc/html/rfc3022
  • Cloudflare — What Is My IP Address? — cloudflare.com/learning/dns/glossary/what-is-my-ip-address/
  • Cisco — NAT Frequently Asked Questions — cisco.com/c/en/us/support/docs/ip/network-address-translation-nat/26704-nat-faq-00.html
  • IANA — IPv4 Special-Purpose Address Registry — iana.org/assignments/iana-ipv4-special-registry