keepcalculator

06 Numbers and Powers

Open Network Connections: What They Are & How to Check

Card No. 06·43914 · Updated · Standard formula, shown below

Open network connections are active data links between your computer and another device on a network, such as a web server, a printer, or another PC. They are the pathways through which all internet traffic flows, and you can view them on Windows, macOS, and Linux using built-in commands like netstat. This article explains what open connections mean, how to list them, how to interpret the results, and how to spot potentially unwanted activity.

What Exactly Is an Open Network Connection?

An open network connection is a communication session between two programs over a network. It is defined by a five-tuple: the local IP address, the local port number, the remote IP address, the remote port number, and the transport protocol (usually TCP or UDP). When you open a website, your browser creates an open TCP connection to the server’s port 80 (HTTP) or 443 (HTTPS). That connection stays open until the transfer is complete or a timeout occurs.

Connections can be in different states. The most common are:

  • LISTENING – a program is waiting for incoming connections (e.g., a web server).
  • ESTABLISHED – a connection is active and data can flow.
  • TIME_WAIT – the connection is closed, but the system is waiting to ensure all packets are delivered.
  • CLOSE_WAIT – the remote side closed the connection, but the local program hasn’t closed its end yet.

UDP connections are often shown as UDP with no state because UDP is connectionless – there is no handshake or session, just packets sent to an address.

Why Should You Care About Open Connections?

Every app that uses the internet – browsers, email clients, game launchers, cloud sync tools – maintains open connections. Knowing how to list them helps you:

  • Diagnose network issues (e.g., too many TIME_WAIT connections slowing down a server).
  • Detect suspicious activity, such as a program phoning home to an unknown IP.
  • Verify that a firewall rule is working as expected.
  • Understand what your computer is doing when it’s idle.

For example, if you see a connection to a remote IP on port 6667 (IRC) but you don’t run an IRC client, that could be a sign of malware. However, many legitimate services use high ports, so don’t panic – investigate first.

How to List Open Connections (Windows, macOS, Linux)

All major operating systems include the netstat command. Open a terminal or command prompt and type:

netstat -an

This shows all connections and listening ports with numeric addresses. Add -o on Windows to get the process ID (PID), and -p on Linux to show the program name. On macOS, use netstat -anv to see the PID.

For a more user-friendly view, you can use:

  • Windows: netstat -anob (requires admin) to see the executable name.
  • Linux: ss -tulpn (or ss -tulw for all) – this is faster and more readable than netstat.
  • macOS: lsof -i – lists connections with the program name.

These commands don’t change anything – they only read the system’s network table.

How to Interpret the Output

Here’s a sample line from netstat -an on Windows:

TCP    192.168.1.10:54321    93.184.216.34:443    ESTABLISHED

This means your computer (192.168.1.10) is using local port 54321 to talk to the remote server 93.184.216.34 on port 443 (HTTPS). The state is ESTABLISHED, so data is flowing. If the remote port is 443 or 80, it’s likely a web request. Port 53 is DNS, 22 is SSH, 25 is SMTP (email sending).

Local ports above 49152 (the dynamic range) are typically ephemeral – they are assigned randomly by your OS for outgoing connections. Listening ports are usually low numbers (e.g., 80, 443, 8080).

If you see a connection to a remote IP on a port you don’t recognize, you can look up the IP using nslookup or an online WHOIS service. But remember: many cloud services use common ports, so a connection to port 443 on an unknown IP could just be a CDN (content delivery network) serving a website you visited.

Common Problems and Misconceptions

One common misconception is that any open connection is a security risk. In reality, a normal computer has dozens of open connections at any moment – that’s how the internet works. The risk comes from connections to malicious IPs or from programs you didn’t install.

Another issue is the TIME_WAIT state. When a TCP connection closes, it enters TIME_WAIT for about 2 minutes to allow delayed packets to arrive. On a busy server, thousands of TIME_WAIT sockets can exhaust the port range, causing connection failures. This is a server-side tuning issue, not a security problem.

Also, people often confuse listening ports with open ports. A listening port is open on the local machine – it’s waiting for a connection. An open port on a firewall is a different thing: it’s a rule that allows incoming traffic. The netstat command shows listening ports, not firewall rules.

How to Close an Unwanted Connection

If you find a connection you want to terminate, you have two options:

  1. Close the program that owns the connection. Use Task Manager (Windows), Activity Monitor (macOS), or kill (Linux) to end the process.
  2. Kill the connection directly (advanced): On Windows, use netstat -ano to find the PID, then taskkill /PID <pid> /F. On Linux, use ss -K or tcpkill. On macOS, use sudo lsof -ti :port | xargs kill -9.

Be careful – killing a system process can crash your OS. Only terminate connections you are sure are unwanted.

Frequently Asked Questions

How many open connections is normal?

There is no fixed number – it depends on what you’re doing. Browsing the web with a few tabs might show 20–50 established connections. A torrent client can have hundreds. If you see thousands of connections and your network is slow, that could indicate a problem, but it’s not inherently dangerous.

Can I see which program owns a connection?

Yes. On Windows, use netstat -anob (admin). On Linux, use ss -tulpn. On macOS, use lsof -i. These will show the process name and PID.

What does an open connection on port 22 mean?

Port 22 is the default for SSH (Secure Shell). If you see an incoming connection to port 22, someone is trying to access your computer via SSH. If you didn’t set up SSH, that’s a red flag – check your firewall. Outgoing connections to port 22 are normal if you use SSH to connect to remote servers.

Why do I see connections to IP addresses I don’t recognize?

Many websites use content delivery networks (CDNs) like Cloudflare or Akamai, which serve content from many IPs. Also, your OS may connect to Microsoft, Apple, or Google servers for updates, time sync, or push notifications. Use a reverse DNS lookup or WHOIS to see who owns the IP. If it’s a cloud provider and you haven’t visited such a site recently, it’s worth investigating.

Is an open connection the same as an open port?

No. An open connection is an active session between two hosts. An open port is a listening socket on a host that accepts connections. A port can be open (listening) without any active connection. For example, a web server listens on port 80, but if no one is visiting, there are no established connections on that port.

How can I monitor connections in real time?

Use netstat -an repeatedly, or use tools like iftop (Linux), nettop (macOS), or Resource Monitor (Windows). For a graphical view, many firewall apps show active connections. But for a quick check, the built-in commands are enough.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →