IP Addresses & Routing

How to Find Your IP Address on Any Device

Step-by-step ways to find your local and public IP address on Windows, macOS, Linux, iPhone, Android and your router.

Key takeaways

  • Your local address appears in the device's network details; your public address is held by your router or provider.
  • ipconfig, ifconfig and ip addr list addresses on Windows, macOS and Linux respectively.
  • Phones show the Wi-Fi address inside the settings for the connected network.
  • A 169.254 address means the device did not receive settings automatically.
  • A VPN or proxy changes the public address that websites see.

To find your device's local IP address, open its network settings and view the details of the active connection, or run ipconfig on Windows, ip addr on Linux or ifconfig on macOS. To find your public IP address, check your router's status page or visit a web tool that reports the address it receives from you.

Those are usually two different numbers. Decide which one you need before you start: the local one is for things inside your network, such as printers and file sharing, and the public one is what outside services see.

Which address do you need?

Pick the right address to look up
Setting up a printer, share or port rule at home? YES You need the local address of that device. 1 NO Trying to log in to your router? YES You need the default gateway address. 2 NO Adding yourself to a remote allow list? YES You need your public address. 3 NO Collect all three Support staff often ask for local, gateway and public. Setting up a printer, share or port rule at home? 1 IF YES You need the local address of that device. NO Trying to log in to your router? 2 IF YES You need the default gateway address. NO Adding yourself to a remote allow list? 3 IF YES You need your public address. NO Collect all three Support staff often ask for local, gateway and public.

Windows

From Settings: open Settings, go to Network & internet, choose Wi-Fi or Ethernet, and open the connection's properties. The IPv4 and IPv6 addresses are listed there. Menu names vary slightly between versions.

From a terminal: open Command Prompt or PowerShell and run:

ipconfig

Look for the adapter that is actually connected. Under it you will see:

  • IPv4 Address: your local address, such as 192.168.1.24.
  • Subnet Mask: usually 255.255.255.0 at home.
  • Default Gateway: your router.
  • IPv6 Address and Link-local IPv6 Address, if present.

For more detail, including DHCP and DNS servers, run ipconfig /all. In PowerShell you can also get a tidier list:

Get-NetIPConfiguration

Computers often show extra adapters from virtual machines, VPN clients or Bluetooth. Ignore those that say "Media disconnected," and prefer the one that has a default gateway.

macOS

From System Settings: open Network, select the active connection (Wi-Fi or Ethernet) and view its details. The IP address and router appear there; exact labels vary by macOS version.

From Terminal:

ipconfig getifaddr en0

en0 is often the Wi-Fi interface on laptops, but not always. If the command returns nothing, list the hardware ports to find the right name:

networksetup -listallhardwareports

ifconfig prints everything, including IPv6 addresses on lines starting inet6. To see the router:

route -n get default

Linux

The modern command is ip:

ip addr

Each interface block shows inet lines (IPv4) and inet6 lines (IPv6) with prefix lengths such as /24. For a compact view:

ip -brief addr

To find the gateway:

ip route

The line beginning default via names the router. On many distributions hostname -I also prints the addresses without extra detail. The desktop environment's network settings show the same information if you prefer to click.

iPhone and iPad

  1. Open Settings and tap Wi-Fi.
  2. Tap the information button next to the network you're connected to.
  3. Scroll to the IPv4 section for the address, subnet mask and router. IPv6 addresses appear below.

On mobile data, iOS doesn't prominently show the carrier-assigned address. A web tool will show what sites receive.

Android

Android menus differ between manufacturers, so treat this as the general path:

  1. Open Settings, then Network & internet (or Connections), then Wi-Fi.
  2. Tap the connected network or its gear icon.
  3. Look for network details; you may need to expand an "Advanced" section.

You'll see the IP address, and often the gateway. An "About phone" status page may also list addresses.

If a reservation or filter on your router seems not to match the phone, check whether the network is set to use a randomized MAC address.

Other devices

Device Where to look
Printer Network menu on its panel, or print a configuration page
Smart TV or streaming box Settings, then Network or About
Game console Settings, then Network, then connection status
ChromeOS laptop Network settings, then the connected network's details
Headless gadget Your router's list of connected devices

The router's client list is the fallback for anything without a screen. It matches addresses to device names or MAC addresses. If names are cryptic, the MAC assignment lookup can suggest which manufacturer a hardware address belongs to.

Your router's two addresses

Your router has a local address, which your devices use as the default gateway, and an internet-side address given by your provider. Open the gateway address in a browser, sign in and look for a page called Status, Internet or WAN. How to log in to your router's admin page helps if you can't get in. Some mesh systems show this only in their phone app.

Finding your public address

The reliable approaches are:

  1. Router status page. Shows the internet-side address.
  2. A web tool. Any site can report the address your request arrived from. The request header echo tool shows what the server observes.
  3. A DNS query. The OpenDNS resolver answers a special name with the address you asked from:
dig +short myip.opendns.com @resolver1.opendns.com

On Windows PowerShell:

Resolve-DnsName myip.opendns.com -Server resolver1.opendns.com

This can fail on networks that force DNS through their own servers.

Tracing your address from device to website
1 Device Holds a local address such as 192.168.1.24. 2 Router, inside Acts as the default gateway for your devices. 3 Router, outside Holds the address your provider assigned. 4 Provider network May translate again if it shares addresses. 5 Website Sees only the final public address. Device Holds a local address such as 192.168.1.24. 1 Router, inside Acts as the default gateway for your devices. 2 Router, outside Holds the address your provider assigned. 3 Provider network May translate again if it shares addresses. 4 Website Sees only the final public address. 5

If the router's internet-side address differs from what the web tool reports, there is another translation layer, or you are using a VPN. See public vs. private IP addresses and carrier-grade NAT.

Reading what you found

If the address starts with It means
192.168., 10., 172.16–172.31 Normal private local address
169.254. No DHCP answer; the connection is not set up
127. or ::1 Loopback, your own device
fe80: IPv6 link-local, normal on every interface
2 or 3 followed by more hex digits Likely a global IPv6 address
100.64–100.127 Shared space, often carrier-grade NAT or an overlay VPN

If you see 169.254, reconnect to the network, restart the router if other devices have the same problem, and confirm the device is set to obtain an address automatically.

You may also see several IPv6 addresses on one interface. That is normal: a link-local address, a stable global one and one or more temporary ones. For outgoing traffic the temporary one is typically used. Checking for working IPv6 explains what to expect.

Finding other devices on your network

Sometimes the address you need belongs to something else: a new camera, a small computer without a monitor, a speaker. Try these in order.

  1. Check the router's client or device list. It is the most complete and needs no extra software.
  2. Try the device's local name. Many devices answer to a name ending in .local, so ping printer.local may reveal an address. The actual name depends on the device.
  3. Look at your computer's neighbor table, which lists devices it has recently exchanged traffic with:
arp -a

That works on Windows and macOS; on Linux, use ip neigh. The table is not a full inventory, because it only holds recent contacts.

  1. Check the maker's app or label. Many gadgets show their address in a companion app.

Scanning tools can list every responding host on a subnet. Use them only on networks you own or are authorized to manage; probing someone else's network can break rules or laws. How ARP works explains where the neighbor table comes from.

If the lookup doesn't make sense

There are several IPv4 addresses. Each adapter has its own. Disconnect the VPN and virtual adapters in your head and read the one with a default gateway.

There is no IPv4 address at all. Some mobile and newer networks run IPv6 only and translate for older destinations. If the internet works, nothing is wrong.

The address changed since yesterday. Dynamic assignment is normal. Update whatever depended on the old value, or reserve it.

Ping to the new address gets no reply. The device may be asleep, on a guest network that isolates clients, or set to ignore ping. Confirm that both devices are on the same network name and subnet.

Sharing addresses safely

A private address reveals little to strangers, so including it in a support request is generally fine. Your public address is seen by every site you visit, but posting it alongside your name, or with a full dump of ipconfig /all, gives away more than needed. Redact hardware addresses and anything identifying your organization. What your IP address reveals about you puts the risk in proportion.

Also be wary of anyone who phones or messages asking you to read out network details so they can "fix" a problem you didn't report. That is a common opening for support scams.

Writing it down for later

If you are collecting addresses for a support ticket or your own records, note the date, the network name, the interface and whether a VPN was on. An address without that context is easy to misread a week later, especially when it was assigned dynamically.

Common questions

Why does my address keep changing?

Local addresses come from your router's DHCP pool and public ones from your provider, and both can be reassigned. To pin a local one, see static vs. dynamic addresses.

Why do two websites show me different addresses?

Your connection probably has both IPv4 and IPv6, and each site was reached over a different one. A VPN with split tunneling can also send sites down different routes.

Written for 4Internet with AI writing tools and not reviewed line by line by a person. Check anything you rely on with the maker, provider or standard concerned. Report an error.

Keep reading

All 45 articles in IP Addresses & Routing →

Latest news on this topic