What an IP address is and why you need to know yours
Your IP address is a number that identifies your device on your home network and on the internet. It looks like four numbers separated by periods — for example, 192.168.1.5 on your home network, or something like 203.45.67.89 on the wider internet. You need to know your IP address when you're setting up network security, troubleshooting connection problems, or configuring devices to talk to each other.
Your device actually has two IP addresses: a local IP address that only works inside your home network, and a public IP address that the outside internet sees. Most of the time when you're working with home network security, you're looking for the local one.
Key Takeaways
- Your local IP address is the number your router assigns to your device and is usually found in your network settings or by running a command in the terminal.
- Windows users can find their local IP by opening Command Prompt and typing ipconfig, then looking for the line labeled "IPv4 Address".
- Mac and Linux users can open Terminal and type ifconfig or ip addr to see the same information.
- Your public IP address (the one the internet sees) can be found by visiting a website like whatismyipaddress.com or by asking your router's admin page.
- Write down your local IP address if you're configuring port forwarding, setting up a static address, or troubleshooting network devices.
Finding your IP address on Windows
Open the Start menu and type "Command Prompt" into the search box. Click on Command Prompt when it appears. A black window will open with a blinking cursor.
Type ipconfig and press Enter. The window will fill with network information. Look for the section labeled "Ethernet adapter" or "Wireless LAN adapter" depending on whether you're using a cable or Wi-Fi. Under that section, find the line that says "IPv4 Address" — the number next to it is your local IP address. It will usually start with 192.168 or 10.0.
If you prefer not to use Command Prompt, you can also find your IP address through the Settings app. Open Settings, click on Network & Internet, then Wi-Fi (or Ethernet if you're using a cable). Click on your network name, scroll down, and look for "IPv4 address".
Finding your IP address on Mac
Open Spotlight search by pressing Command and Space together. Type "Terminal" and press Enter. A black window will open.
Type ifconfig and press Enter. The terminal will show a list of network interfaces. Look for the section labeled "en0" (for Wi-Fi) or "en1" or "en5" (for Ethernet). Under that section, find the line that starts with "inet" — the number after "inet" is your local IP address.
If you prefer the graphical method, click the Apple menu in the top left, select System Settings, then click Network. Click on your Wi-Fi network or Ethernet connection, and your IP address will appear under "IP Address".
Finding your IP address on Linux
Open a terminal window. The method depends on your Linux distribution, but usually you can right-click on the desktop and select "Open Terminal" or search for "Terminal" in your applications menu.
Type ip addr and press Enter. The terminal will show all your network interfaces. Look for the section labeled "inet" under your active connection (usually labeled "eth0" for Ethernet or "wlan0" for Wi-Fi). The number after "inet" is your local IP address.
Older Linux systems may use ifconfig instead of ip addr. If ip addr doesn't work, try typing ifconfig and pressing Enter. The output will look similar.
Finding your public IP address
Your public IP address is what websites and services on the internet see when you connect to them. It's different from your local IP address and changes periodically depending on your internet service provider.
The easiest way to find your public IP is to visit a website that displays it. Open a web browser and go to whatismyipaddress.com or similar services. The page will show your public IP address when ready — no login or read needed.
You can also find your public IP by logging into your router's admin page. Open a web browser and type 192.168.1.1 or 192.168.0.1 into the address bar. Log in with your router's username and password (usually printed on the router itself). Look for a section labeled "WAN" or "Internet" to find your public IP address.
When you need your local IP versus your public IP
Use your local IP address when you're setting up devices inside your home network. If you're configuring port forwarding on your router, setting up a static IP address for a printer or security camera, or troubleshooting why a device can't connect to another device on your network, you need the local IP.
Use your public IP address when you're accessing your home network from outside your home, setting up remote access, or checking what address the outside world sees when you connect to a website. Your public IP is also what you'd give to someone who needs to connect to a service running on your home network from outside.
Keeping your IP address stable
Your router assigns a new local IP address to your device each time it connects, which can cause problems if you're relying on a specific address for port forwarding or device configuration. If you find yourself checking your IP address repeatedly, consider setting a static IP address instead.
A static IP means your device always gets the same local IP number from your router. You can set this either on the device itself (in your network settings) or on your router's admin page by reserving an IP address for that device's hardware address. This way you won't have to look up the IP address again.
Frequently Asked Questions
Why does my IP address keep changing?
Your router assigns local IP addresses dynamically, meaning it picks a new one each time your device connects. This is normal. If you need the same address every time, ask your router to reserve a static IP for that device, or set a static address in your device's network settings.
Is my local IP address private and safe to share?
Your local IP address only works inside your home network, so sharing it is not a security risk. Your public IP address is visible to every website you visit, so it's also not secret — but you should still avoid posting it publicly because it identifies your home internet connection.
What if I can't find my IP address using these steps?
Make sure you're connected to your network (Wi-Fi or Ethernet). If you're using a VPN, it may hide your real IP. Try disconnecting the VPN and running the command again. If you're still stuck, restart your device and try once more.
Can I change my IP address?
You can change your local IP address by setting a static address in your network settings or by reserving a different address on your router. Your public IP address is assigned by your internet service provider and changes periodically on its own, but you can force a change by restarting your modem.