How to Check If an IP Port Is Open
Knowing whether a specific port is open on an IP address is a fundamental networking skill — useful for troubleshooting connectivity issues, verifying firewall rules, setting up servers, or confirming that a service is actually listening where it should be. The method that works best depends on your operating system, your technical comfort level, and whether you're checking a local machine or a remote host.
What "Open Port" Actually Means
A port is a numbered endpoint (0–65535) that operating systems use to direct network traffic to the right application. When a port is open, it means a service or process is actively listening on that port and accepting connections. When it's closed, no service is listening. A port can also be filtered, meaning a firewall is blocking the probe without sending back a clear response.
Ports are paired with either TCP (Transmission Control Protocol) or UDP (User Datagram Protocol). Most common services use TCP — web traffic runs on ports 80 (HTTP) and 443 (HTTPS), SSH uses port 22, and FTP uses port 21. UDP is used by DNS (port 53), gaming protocols, and streaming applications.
Methods for Checking Open Ports
Using Telnet (Windows, macOS, Linux)
Telnet is one of the oldest and simplest ways to test whether a TCP port is open. You're essentially attempting a raw connection — if it succeeds, the port is open.
For example:
A blank screen or cursor means the connection was accepted — port is open. A "Connection refused" or "Could not open connection" message means it's closed or blocked.
Note: Telnet is disabled by default on modern Windows. You can enable it through Windows Features in the Control Panel. It's generally available on macOS and Linux by default or easily installable.
Using Netcat (nc) on macOS and Linux 🔍
Netcat is a versatile networking tool that handles both TCP and UDP port checks.
The -z flag scans without sending data; -v gives verbose output. For UDP:
UDP results are less reliable because UDP doesn't use handshakes the way TCP does — a non-response doesn't definitively mean the port is closed.
Using PowerShell on Windows
Modern Windows systems can use the Test-NetConnection cmdlet: