DEV Community

TechThatConnect
TechThatConnect

Posted on • Updated on

IP lookup, how to find your address

So you want to find your IP address for one reason or another. I will walk you through two ways of checking your IP address on both Windows and Mac but first let's cover some basics. IP(Internet protocol) is a set of conventions we use when connecting multiple devices together. An IP address is the way that machines identify devices on a network. There are also private and public ip addresses. Private would be the ip address assigned to your computer ( or mobile, tablet, smart device, ext...) by the networking device(most often a router) in your home. This address is only used to identify that device on a specific network. The public address is the ip address of your network device assigned to your home network by your ISP(Internet service provider). When you request to visit a website the public address of your network is sent along with that request so the server knows where to send the files. It is then the networking device's job to send those files to the correct device on the network.

Graphic Interface(easy)

Windows

Open the control panel through the start menu (search control panel if you can't locate it). Under 'network and internet' click 'view network status and tasks'. Click the name of your network connection (most likely wifi or ethernet) this will open a new window. Below some of the information you should find a details button click that. Among the info listed you should find an IPv4 address, this is your private IP, and the public address is listed as IPv4 default gateway.

Mac OS

Click the apple logo and open system preferences. Then go to the Network option. Depending on if you're connected by wifi or ethernet you will have to select that type of connection on the left hand side (one will have a green selection display that is the way you are connected with). Once clicked the connection type will display an ip address on the upper right hand side this is your private ip address of the machine you are using. To find the public address click advanced in the bottom right then select the TCP/IP tab along the top. Among the information displayed should be your router's IP labeled router.

With a Terminal (advanced)

Windows

Open the command prompt or powershell and run the following command.

ipconfig

This will display a fair amount of information. You will be looking for the line that says default gateway under network adapter. That's your router's ip address (public). If you wish to find your computer's ip (private) it will be labeled ipv4 address.

mac

Open the terminal and then the command you run will vary based on if you are connected via wifi or ethernet. For ethernet run

ipconfig getifaddr en1

And for wifi run

ipconfig getifaddr en0

Note that these commands will display your local ip for the machine you run these commands on. The public ip address for your network is that of your router. Which you can find by running the following command

curl ifconfig.me

Safety tip

Now you know how easy it is to find your ip address. The unfortunate part is that others can find it as well. Remember earlier I mentioned how when you request to visit a website your public ip is sent along with that request. This is how advertisers know to show you ads for the shop down the street and not one on the other side of the country. It is also how hackers can find your network. Using a VPN service to keep your IP hidden. Protecting you from potential online threats. Nothing is foolproof and there is always a level of risk when using the internet but VPNs can really help keep you safe.

This article is also posted on Medium

Top comments (0)