Learn how to use the netstat command on Windows to view active TCP connections, including local addresses, remote endpoints, ports, and connection states.
Viewing TCP Connections Windows
To view our TCP connections, all we have to do is open up a command prompt and type in netstat, and it's going to show us the connections that we have. It's going to show us quite a few — Windows sets up a lot of different connections right away to different devices out there.
I opened up our website to the Pi just to show you what that looks like. Here we see that things are still collecting. Once again, Windows is very chatty and it likes to go and make connections and get things like Windows updates, and there are other connections that this machine is making.
We see that most of the protocols here are TCP versus UDP. And then we also see the local address. Most of them are on the wireless interface here, because that's the one that makes the connection to the outside world. But we do see the one that I generated on the local interface right here. We see that it has 10.1.0.14, which is the static IP address I assigned to this machine. And it's using port 6309 — 60,39 is the port that it's using to reach out to this web server.
And then it is reaching out to 10.1.0.3 colon http, which just means it's replaced that port 80 with http, because that's the well-known port for HTTP, port 80. And then the state that it's in. We're not going to get real in depth into what the different states are here, but you can see that there are different states that are involved.
So there is how to look up the open TCP connections, or the open layer 4 connections, on your machine.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →