How to find your public and private IP address: a complete guide to understanding and checking it

Last update: 17/11/2025
Author Isaac
  • Public IPs identify your connection on the Internet; private IPs identify each device within your network.
  • NAT translates between private and public IPs; CGNAT can limit incoming connections when sharing an IP.
  • Check your public IP address in your browser and your private IP address in settings or with ipconfig/ifconfig/ip addr.

Public and private IP addresses

You may have looked up your IP address before and found a sequence like 123.198.3.221; that's what the Internet sees as your IP address, while in your home or office each device uses a different one to communicate within the network. In this clear and comprehensive guide you will understand what an IP address is, how public and private IP addresses differ, and how to view both on any device.

In addition to explaining the concepts, we will show you practical methods to check your public IP and private IP in Windows, macOS, Linux, Android, iPhone or from the panel of router. We will discuss IPv4 and IPv6, the role of NAT, CGNAT by operators, dynamic and static IPs, the relationship between IP and DNS, and the difference with the address MAC, with Tricks to change or protect your address when appropriate.

What is IP and what is an IP address?

IP stands for Internet Protocol and is the set of rules that makes it possible for data to travel over networks like your Wi-Fi or the Internet. An IP address is the unique numerical identifier assigned to each network interface so that devices can recognize each other and send information..

In IPv4, an IP address is represented with four decimal blocks separated by periods (for example, 192.168.1.1), each block ranges from 0 to 255 and in total there are 32 bits. In that structure, there is a part that identifies the network and another that identifies the host or device., something that is determined by the subnet mask.

There is also IPv6, an evolution with longer, alphanumeric addresses (such as 2001:db8::1), designed to avoid address shortages. With IPv6 there will be plenty of addresses and many scenarios will no longer depend on translations like NATalthough both versions coexist today.

Differences between public IP and private IP

In a typical home network, the router connects your local network to the internet. It uses a public IP address for outgoing connections and assigns private IP addresses to your devices for incoming connections. Your public IP address identifies your connection to the rest of the internet, and your private IP address identifies each device within your local network..

Your public IP address is assigned by your Internet Service Provider (ISP) and is what websites, services, and other servers see when you connect. Without a public IP address, your router wouldn't be able to exchange data with the outside world..

Private IPs, on the other hand, do not circulate on the Internet and are only used within local networks (home, business, educational center). The router assigns a different private IP address to each device so that it can direct traffic to the correct computer..

To avoid confusion, there are ranges reserved solely for private IPs in IPv4: 10.0.0.0 to 10.255.255.255 (class A), 172.16.0.0 to 172.31.255.255 (class B) and 192.168.0.0 to 192.168.255.255 (class C).

Private IP address, classes, and network mask

The three private ranges above were chosen to cover everything from very large networks to domestic ones. In class A the first block identifies the network; in class B the first two; and in class C the first three., leaving the rest for hosts.

The network mask (for example, 255.255.255.0) indicates how many bits are for the network and how many are for the host. With a mask of 255.255.255.0 you have 256 addresses, of which 254 are valid for devices (network and broadcast are excluded).

  Change DNS in Windows 11 step by step and options

That's why in many homes you see IPs like 192.168.1.x: these are very common Class C networks. Having two devices on the same network share the same private IP address will cause a conflict, but the same number can be reused on a different private network..

Public IP ranges and other reservations

A public IP address is any IP address that does not belong to private ranges or special spaces (loopback, link-local, documentation, etc.). In practice, if your address does not start with 10., 172.16-31. or 192.168., and does not fall within restricted ranges, it is public..

There are other reserved blocks, such as 127.0.0.0/8 (loopback) or 169.254.0.0/16 (autoconfigurable link-local). These addresses are also not advertised on the Internet and their use is specific..

How they work together: NAT as an "interpreter"

When you access a website from your mobile phone connected to your home Wi-Fi, your phone sends packets from its private IP address to the router; the router translates them to your public IP address and connects you to the Internet. This process is called NAT (Network Address Translation) and allows many devices to share the same public IP address..

The web response goes back to the router's public IP address, which remembers which device initiated the connection and redirects it to its private IP address. This way, the website never sees your phone's private IP address, only your public connection's IP address..

Dynamic IP vs Static IP

Most households have a dynamic public IP address that changes with There or by restarting the router, depending on the ISP. Static IPs do not change and are usually contracted to host services accessible from outside..

Within the local network, the router assigns private IPs using DHCP. You can manually set a private IP address on the device or reserve it on the router so that it always provides the same one., useful for ports or critical equipment.

IP address vs MAC address

IP and MAC are not the same: IP belongs to the network layer and can change; MAC uniquely identifies the network card at the link layer. The MAC address has 48 bits and the IP (IPv4) address has 32, and they fulfill different roles although they collaborate to ensure that traffic reaches its destination..

Relationship between IP and DNS

When you type a domain, the browser queries a DNS server to translate that name to a server IP address. DNS allows you to remember names like example.com instead of numerical sequences..

A single service can have multiple IPs (load balancing, redundancy) and a single server can serve multiple domains. Thanks to DNS and the IP address, the connection finds the correct "address" on the Internet.

How to find your public IP address

The quickest way is to open your browser and search for "what is my IP address". Search engines or specialized websites will instantly show you your public IP address..

Keep in mind that if your operator changes your dynamic IP address, you will see a different number at different times. That's normal and doesn't require any action on your part unless you need a static IP address for a specific service..

How to find your private IP address on each system

Besides checking it in network settings, you can also use the terminal or line of commands depending on the operating system. Below you'll find simple and quick methods for each common platform..

  How to Use NTTTCP on Windows: Tests, Commands, and Tweaks

Windows

From the console: press Windows + R, type cmd and accept. In the black window, run ipconfig. Locate "IPv4 Address" on your active adapter (Ethernet or Wi-Fi) and that value is your private IP address..

From the interface: Settings → Network & Internet → Network properties (or View properties). In that panel you will see IP address, subnet mask, gateway, and other details.

MacOS

System Preferences (or System Settings) → Network → select your interface (Wi-Fi/Ethernet). The panel displays "IP Address", which corresponds to your private IP address on the local network.

You can also open Terminal and run ifconfig. Look in the active interface (in Wi-Fi this is usually en0/en1) for the inet line with the value 192.168.xx/10.xxx.

Linux

Open a terminal with Ctrl + Alt + T and run ip addr o ifconfig if available. As in other systems, it locates the internet address of the interface in use.

Android

Settings → Wi-Fi → tap on your connected network to see the details. In "IP Address" your private IP address within the LAN will appear.

iPhone / iPad

Settings → Wi-Fi → tap the information icon (i) for your network and, if you need to adjust network options, see how Modify the settings to download from Wi-Fi or mobile data on iPhone. The "IP Address" is listed in the IPv4 configuration section.

From the router

Access the router's control panel by typing its IP address (usually 192.168.1.1 or 192.168.0.1) into your browser and logging in. In the connected devices section you will see the list with the private IPs of each device..

What is the IP address of my router or Wi-Fi network?

The IP address of the router to your network is the default gateway; it is usually 192.168.1.1 or 192.168.0.1, although it may vary. On any connected device, you can see the "Gateway" in the network details to find out what it is..

If the panel doesn't open, check the router's username and password (they are often on a label). From there you manage DHCP, IP reservations, Wi-Fi, ports, and other network settings.

Can I change my IP address?

For a dynamic public IP address, sometimes simply restarting the router is enough; it doesn't always change, it depends on your ISP and the lease time. On Windows you can try with ipconfig /release and then ipconfig /renewHowever, this affects your private IP address..

If you need your public IP address to remain constant, request a static IP address from your internet service provider (this usually incurs a fee). For internal services, assign private IPs or create DHCP reservations on the router to ensure that each device retains the same address..

CGNAT: when you share a public IP address with other clients

Many operators use CGNAT, a technique whereby several subscribers share the same public IP address. This mitigates the IPv4 address shortage, but may limit incoming connections or certain P2P functions and online games..

If you need to expose a service on your network (cameras, NAS, game server) and you are behind CGNAT, you may not be able to forward ports. The solution is usually to ask your operator to remove you from CGNAT or to contract a dedicated public IP address..

Privacy and security: how to "hide" your IP

Your public IP address allows websites and services to know, at a minimum, your approximate location and associate activity with it. An VPN It encrypts your traffic and "masks" your real public IP address behind the VPN server's IP address, useful for privacy and access to regional content..

In public networks, it is also advisable to tighten local visibility by marking the network as "public" in Windows and avoiding sharing resources. This reduces the exposure of your private IP address and internal services to other users on the same Wi-Fi network..

  All the ways to download images from Google Docs

Is it possible to locate an IP address?

With a public IP address, an approximate geolocation (city/region) can be obtained from databases from the operators; it does not give an exact postal address. Private IPs, since they don't go out onto the Internet, are only visible within the network itself and cannot be used to identify you outside of it..

Keep in mind that dynamic IPs change and geolocation services are not always up to date. Furthermore, if you browse using a VPN, the location they will see will be that of the server you connect to..

IPv4 and IPv6: What type of IP do you have?

Today it is common to have both stacks active: your computer can have a private IPv4 and a local IPv6, and your provider can also give you a public IPv6. In the network details you'll see if there's an IPv6 address and if you have global connectivity with it..

Although some guides recommend disabling IPv6 to resolve specific problems, ideally it should be kept on when it works well. IPv6 is designed so that each device has its own public IP address, reducing the need for NAT..

What is the purpose of knowing your IP address?

With your public IP address you can diagnose connection problems or configure services accessible from outside (if your operator allows it). With your private IP address, you can identify each device, assign firewall rules, reserve DHCP servers, or open ports to specific devices..

This is key information for setting up home servers (games, FTP, web), managing home automation, or limiting a computer's access on your network. It's also useful for technical support: many diagnostics begin by knowing what IP address you have on each segment..

Practical examples and tips

If you play online and notice problems creating matches or receiving invitations, check if you are under CGNAT and if your console/PC always receives the same private IP. A DHCP reservation and, if necessary, exiting CGNAT usually resolves strict NAT conflicts.

To access your NAS from outside, you will need to know your public IP address or use a service of Dynamic DNS if it changes often. Open the necessary ports to the NAS's private IP address and apply robust encryption and authentication..

If a website blocks you by IP and you can't wait for your dynamic IP to change naturally, you can connect using a VPN. Keep in mind that some platforms also detect and restrict VPN IPs, so the result will depend on the service..

When one page fails to load but others do, check if your DNS resolves the domain and if your public IP address is not being filtered by the destination website. Trying a different network or temporarily changing your DNS helps isolate the problem.

And if you lose connection on only one device in the house, check its private IP address: that it belongs to your subnet, that it is not repeated, and that the gateway is that of the router. Un simple ipconfig /all or checking Settings often reveals an incorrect configuration.