How to Check If a Port Is Open on Windows, Mac, Linux and Online
“Is this port open?” can mean two different things: is something listening on the port on your own computer, or can the internet reach it? You usually need to check both. Here is how.
Method 1: Check from the internet with an online tool
This answers the question that matters for port forwarding. Open our port checker, type the port number and press Check. It connects to your public IP address and reports:
- Open. Something accepted the connection.
- Closed. The connection was refused, so nothing is listening or a firewall rejected it.
- No response. The request timed out, which usually means a firewall is silently dropping traffic.
Method 2: Windows
To see whether your PC is listening on a port, open Command Prompt and run:
netstat -ano | findstr :8080
A line with LISTENING means a program is waiting on that port. To test a connection to another machine, use PowerShell:
Test-NetConnection -ComputerName 192.168.1.50 -Port 443
Look for TcpTestSucceeded : True.
Method 3: macOS and Linux
- What is listening locally:
sudo lsof -iTCP -sTCP:LISTEN -Porss -ltnp. - Connect to a remote port:
nc -zv example.com 443prints whether the connection succeeded.
Method 4: Scan with Nmap
nmap -p 22,80,443 192.168.1.50 reports each port as open, closed or filtered. Only scan machines you own or have permission to test, because scanning other people's systems can be against the law or a provider's terms.
If a port should be open but is not
- Make sure the program is running and listening on the right port, and on the right address. A service bound to
127.0.0.1is not reachable from other machines. - Allow the port in the computer's firewall.
- Forward the port on your router to the device's private address. See what port forwarding is.
- Check whether your provider uses carrier-grade NAT. If your router's WAN address differs from the address on our IP checker, inbound connections cannot reach you.
- Remember that UDP services cannot be confirmed the same way, because UDP has no connection handshake.
Try it yourself
See the real numbers for your own connection with our free tools.