New

The new HostCloud is live. Web Hosting for ₹1 for your first month.

Web Hosting for ₹1 · first month

Claim offerClaim
Hosting & Performance

How to check if a port is open on a remote server (telnet, nc, nmap and online tools)

Four reliable ways to test whether a port is open, plus what the results mean and how to fix a closed or filtered port.

13 November 2026 · 8 min read
How to check if a port is open on a remote server (telnet, nc, nmap and online tools)

How to check if a port is open on a remote server (telnet, nc, nmap and online tools)

TL;DR: To check whether a port is open, try to connect to it from outside the server. Use nc -zv host port or nmap -p port host on Linux or macOS, Test-NetConnection host -Port 443 in Windows PowerShell, or an online port checker. "Open" means a service accepted the connection. "Closed" means nothing is listening. "Filtered" or a timeout usually means a firewall is blocking it. Only scan servers you own or have permission to test.

What an open port means

A port is a numbered door on a server. A service such as a web server listens on one port. If you reach it and the service answers, the port is open. Common ones:

Port Service
22 SSH
25, 465, 587 SMTP email
80 HTTP
443 HTTPS
3306 MySQL

Only open ports you need. Every extra open port adds attack surface.

Diagram showing a connection test passing through router, provider firewall and server firewall to an open port

Method 1: netcat

nc -zv example.com 443

A message such as "succeeded" or "open" means it connected. Add -w 5 to set a five-second timeout.

Method 2: nmap

nmap -p 22,80,443 example.com

The output lists each port as open, closed or filtered. Scan only your own servers. Scanning other people's systems may be illegal or against their terms.

Method 3: Windows PowerShell

Test-NetConnection -ComputerName example.com -Port 443

TcpTestSucceeded : True means the port is open.

Method 4: online port checker

An online checker connects from its own server, which is a better test of what the internet sees. Enter your public IP and the port. If your home or office router blocks it, the result shows closed even when the service runs on your machine. Find your address in what is my IP.

Why a port shows closed or filtered

  • Nothing is listening. The service is stopped or bound to localhost. On the server, run ss -tulpn to see listening ports.
  • Server firewall. UFW or iptables blocks it. See UFW firewall rules.
  • Hosting provider firewall or security group. Check your control panel.
  • Router or ISP blocking. Some home providers block ports such as 25.
  • Wrong IP or DNS. You are testing the wrong host.

Fix the cause, retest from outside and close any port you opened only for testing.

FAQs

How do I check if port 443 is open?

Run nc -zv yourdomain.com 443, or use Test-NetConnection on Windows.

What does filtered mean in nmap?

The scan got no reply, which usually means a firewall is dropping the packets.

Scanning your own servers is fine. Scanning others without permission can break laws and terms of service.

Why is my port open locally but closed online?

A firewall, router or hosting security group is blocking outside access.

How do I see which ports are listening on my server?

Run ss -tulpn as root.

Should I leave port 22 open to everyone?

Better to restrict it by IP and use keys. See SSH hardening.

Why can't I reach SMTP port 25?

Many providers block outbound port 25 to reduce spam. Use 587 or 465 with authentication.

How do I close an open port?

Stop the service or block the port in the firewall, then retest.

Conclusion

Test ports from outside the server with nc, nmap, PowerShell or an online checker, then read the result: open, closed or filtered. If a port is blocked, check the service, the server firewall, the provider firewall and the network in turn, and keep only the ports you need open.

HostCloud helps Indian websites with reliable hosting, domains and support. See the options at https://hostcloud.in.

Sources:

Related posts